commit 978462aee15506a89e6b3ad321cb5566751943c1
parent f0ee24b945456508ff841409837cab7cc577b968
Author: awy <awy@awy.one>
Date: Wed, 18 Jun 2025 02:30:06 +0300
fixes
Diffstat:
2 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/.config/i3blocks/config b/.config/i3blocks/config
@@ -28,6 +28,26 @@ command=sb-news
interval=once
signal=6
+# [price-xmr-btc]
+# command=sb-price xmr-btc "Monero to Bitcoin" 🔒 25
+# interval=9000
+# signal=25
+
+# [price-xmr]
+# command=sb-price xmr Monero 🔒 24
+# interval=9000
+# signal=24
+
+# [price-eth]
+# command=sb-price eth Ethereum 🍸 23
+# interval=9000
+# signal=23
+
+# [price-btc]
+# command=sb-price btc Bitcoin 💰 21
+# interval=9000
+# signal=21
+
[torrent]
command=sb-torrent
interval=20
diff --git a/.local/bin/statusbar/sb-price b/.local/bin/statusbar/sb-price
@@ -37,7 +37,7 @@ updateprice() { curl -sf \
updateme="1"
case $BLOCK_BUTTON in
- 1) setsid "$TERMINAL" -e less -Srf "$chartfile" >/dev/null 2>&1 ;;
+ 1) setsid -f "$TERMINAL" -e less -Srf "$chartfile" >/dev/null ;;
2) notify-send -u low "$icon Updating..." "Updating $name price..." ; updateme="1" ; showupdate="1" ;;
3) uptime="$(date -d "$filestat" '+%D at %T' | sed "s|$(date '+%D')|Today|")"
notify-send "$icon $name module" "\- <b>Exact price: \$$(cat "$pricefile")</b>
@@ -46,7 +46,7 @@ case $BLOCK_BUTTON in
- Shows 🔃 if updating prices.
- <b>Last updated:
$uptime</b>" ;;
- 8) setsid -f "$TERMINAL" -e "$EDITOR" "$0" >/dev/null 2>&1 ;;
+ 8) setsid -f "$TERMINAL" -e "$EDITOR" "$0" >/dev/null ;;
esac
[ -n "$updateme" ] &&
@@ -55,4 +55,4 @@ esac
notify-send "$icon Update complete." "$name price is now
\$$(cat "$pricefile")"
-[ -f "$pricefile" ] && printf "%s%s%0.2f" "$icon" "$symb" "$(cat "$pricefile")"
+[ -f "$pricefile" ] && printf "%s%s%0.2f\n" "$icon" "$symb" "$(cat "$pricefile")"