summaryrefslogtreecommitdiffstats
path: root/.local/bin/statusbar
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2020-07-02 15:28:31 -0400
committerLuke Smith <luke@lukesmith.xyz>2020-07-02 15:28:31 -0400
commitac7d2ddffc0cd155c971b63ef9c7a9db649baaa5 (patch)
tree1615c323df36da049f560d6606a8d6eedc774866 /.local/bin/statusbar
parentf11008c619e1746d0d3f25c471343c1591200941 (diff)
downloadeibhear-ac7d2ddffc0cd155c971b63ef9c7a9db649baaa5.tar.gz
eibhear-ac7d2ddffc0cd155c971b63ef9c7a9db649baaa5.tar.zst
eibhear-ac7d2ddffc0cd155c971b63ef9c7a9db649baaa5.zip
price module update fix
Diffstat (limited to '.local/bin/statusbar')
-rwxr-xr-x.local/bin/statusbar/price6
1 files changed, 3 insertions, 3 deletions
diff --git a/.local/bin/statusbar/price b/.local/bin/statusbar/price
index 3f87f7a..45b01ad 100755
--- a/.local/bin/statusbar/price
+++ b/.local/bin/statusbar/price
@@ -11,18 +11,18 @@ dir="${XDG_DATA_HOME:-$HOME/.local/share}/crypto-prices"
pricefile="$dir/$1"
chartfile="$dir/$1-chart"
-updateprice() { ping -q -c 1 1.1.1.1 >/dev/null 2>&1 &&
+updateprice() { ping -q -c 1 example.org >/dev/null 2>&1 &&
curl -s "rate.sx/1$1" > "$pricefile" &&
curl -s "rate.sx/$1$interval" > "$chartfile" ;}
[ -d "$dir" ] || mkdir -p "$dir"
[ "$(stat -c %x "$pricefile" 2>/dev/null | cut -d' ' -f1)" != "$(date '+%Y-%m-%d')" ] &&
- updateprice
+ updateprice "$1"
case $BLOCK_BUTTON in
1) setsid "$TERMINAL" -e less -Sf "$chartfile" ;;
- 2) notify-send -u low "$3 Updating..." "Updating $2 price..." &&
+ 2) notify-send -u low "$3 Updating..." "Updating $2 price..."
updateprice "$1" && notify-send "$3 Update complete." "$2 price is now
\$$(cat "$pricefile")" ;;
3) uptime="$(date -d "$(stat -c %x "$pricefile")" '+%D at %T' | sed "s|$(date '+%D')|Today|")"