Shorten ticker values in i3block
This commit is contained in:
@@ -58,6 +58,7 @@ grep "grep --color=auto -n"
|
|||||||
grpr "grep -r"
|
grpr "grep -r"
|
||||||
rgc "rg -S"
|
rgc "rg -S"
|
||||||
rge "rg -t"
|
rge "rg -t"
|
||||||
|
xa "xargs"
|
||||||
# pk "pkill -f"
|
# pk "pkill -f"
|
||||||
cld "colordiff -wy --suppress-common-lines"
|
cld "colordiff -wy --suppress-common-lines"
|
||||||
|
|
||||||
@@ -604,6 +605,7 @@ gl1 "git log --oneline"
|
|||||||
gl1x "git log --oneline -1 | xclip -selection clipboard"
|
gl1x "git log --oneline -1 | xclip -selection clipboard"
|
||||||
gla "git log"
|
gla "git log"
|
||||||
glm "git log master"
|
glm "git log master"
|
||||||
|
glr "git log --reverse"
|
||||||
gqs "git-quick-stats -T"
|
gqs "git-quick-stats -T"
|
||||||
# gsl "git shortlog"
|
# gsl "git shortlog"
|
||||||
gsh "git show"
|
gsh "git show"
|
||||||
@@ -632,7 +634,8 @@ gchh "git checkout HEAD --"
|
|||||||
# grsh "git reset --hard HEAD"
|
# grsh "git reset --hard HEAD"
|
||||||
# grsh1 "git reset --hard HEAD~1"
|
# grsh1 "git reset --hard HEAD~1"
|
||||||
grs "git reset --soft"
|
grs "git reset --soft"
|
||||||
grsh1 "git reset --soft HEAD~1"
|
grs1 "git reset --soft HEAD~1"
|
||||||
|
grs1c "git reset --soft HEAD~1 && git commit --amend --no-edit -S"
|
||||||
grso "git reset --soft orig/master"
|
grso "git reset --soft orig/master"
|
||||||
grsh "git reset --hard"
|
grsh "git reset --hard"
|
||||||
grsho "git reset --hard origin/master"
|
grsho "git reset --hard origin/master"
|
||||||
@@ -865,6 +868,7 @@ lob "lsd -F --group-dirs first 2020*.mkv"
|
|||||||
wo "watch -n60 'lsd -lF --group-dirs first --size short 2020*.mkv'"
|
wo "watch -n60 'lsd -lF --group-dirs first --size short 2020*.mkv'"
|
||||||
|
|
||||||
fnp "t timeline FNProgress | sed -n '2p'"
|
fnp "t timeline FNProgress | sed -n '2p'"
|
||||||
|
fnu "sxiv ~/Documents/fortnite/pics/maps/upgrade.png &"
|
||||||
|
|
||||||
# ]]] games #
|
# ]]] games #
|
||||||
|
|
||||||
|
|||||||
@@ -20,11 +20,27 @@ color=#cbe4ff
|
|||||||
# TICKER=PEJ
|
# TICKER=PEJ
|
||||||
# interval=30
|
# interval=30
|
||||||
|
|
||||||
|
[ticker]
|
||||||
|
# label=DOGE
|
||||||
|
label=🐶
|
||||||
|
TICKER=DOGE-USD
|
||||||
|
interval=30
|
||||||
|
|
||||||
[ticker]
|
[ticker]
|
||||||
label=ADA
|
label=ADA
|
||||||
TICKER=ADA-USD
|
TICKER=ADA-USD
|
||||||
interval=30
|
interval=30
|
||||||
|
|
||||||
|
[ticker]
|
||||||
|
label=ETH
|
||||||
|
TICKER=ETH-USD
|
||||||
|
interval=30
|
||||||
|
|
||||||
|
[ticker]
|
||||||
|
label=BTC
|
||||||
|
TICKER=BTC-USD
|
||||||
|
interval=30
|
||||||
|
|
||||||
[ticker]
|
[ticker]
|
||||||
label=DAQ
|
label=DAQ
|
||||||
TICKER=^IXIC
|
TICKER=^IXIC
|
||||||
|
|||||||
@@ -80,8 +80,8 @@ context.sch=project:sch
|
|||||||
|
|
||||||
# context=home
|
# context=home
|
||||||
# context=out
|
# context=out
|
||||||
# context=pey
|
context=pey
|
||||||
context=not-pey
|
# context=not-pey
|
||||||
# context=sch
|
# context=sch
|
||||||
|
|
||||||
# }}} context #
|
# }}} context #
|
||||||
|
|||||||
@@ -85,13 +85,15 @@ for symbol in $(IFS=' '; echo "${SYMBOLS[*]}" | tr '[:lower:]' '[:upper:]'); do
|
|||||||
# echo $price
|
# echo $price
|
||||||
hour=$(date +"%H")
|
hour=$(date +"%H")
|
||||||
if [[ "$symbol" == "USDCAD=X" ]]; then
|
if [[ "$symbol" == "USDCAD=X" ]]; then
|
||||||
printf "%0.4f\n" $price
|
printf "%0.4f\n" "$price"
|
||||||
elif [[ "$symbol" == "ADA"* ]]; then
|
elif [[ "$symbol" == "BTC-USD" || "$symbol" == "ETH-USD" ]]; then
|
||||||
printf "%0.3f\n" $price
|
echo "$price" | cut -c 1-3
|
||||||
elif (( $(echo "$price > 10000" | bc -l) )); then
|
elif (( $(echo "$price > 1000" | bc -l) )); then
|
||||||
printf "%'0.0f\n" "$price"
|
printf "%'0.0f\n" "$price" | cut -c 2-5
|
||||||
|
# elif (( $(echo "$price < 1" | bc -l) )); then
|
||||||
|
# printf "%0.3f\n" "$price"
|
||||||
else
|
else
|
||||||
printf "%0.2f\n" $price
|
printf "%0.2f\n" "$price" | cut -c 3-
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user