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