Update statusbar
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Set as a cron job to check for new RSS entries for newsboat.
|
||||
# If newsboat is open, sends it an "R" key to refresh.
|
||||
|
||||
ping -q -c 1 example.org > /dev/null || exit
|
||||
|
||||
/usr/bin/notify-send "📰 Updating RSS feeds..."
|
||||
|
||||
pgrep -f newsboat$ && /usr/bin/xdotool key --window "$(/usr/bin/xdotool search --name newsboat)" R && exit
|
||||
|
||||
echo 🔃 > /tmp/newsupdate
|
||||
pkill -RTMIN+6 "${STATUSBAR:-dwmblocks}"
|
||||
/usr/bin/newsboat -x reload
|
||||
rm -f /tmp/newsupdate
|
||||
pkill -RTMIN+6 "${STATUSBAR:-dwmblocks}"
|
||||
/usr/bin/notify-send "📰 RSS feed update complete."
|
||||
14
.local/bin/statusbar/sb-speedtest
Executable file
14
.local/bin/statusbar/sb-speedtest
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) "$TERMINAL" -e speedtest-cli --secure --timeout 1 --no-upload ;;
|
||||
3) notify-send "🌐 Speedtest module" "\- Click to run" ;;
|
||||
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
|
||||
esac
|
||||
|
||||
download_speed="$(speedtest-cli --secure --timeout 1 --no-upload --csv)"
|
||||
|
||||
[[ -z $download_speed ]] &&
|
||||
echo "" ||
|
||||
echo "$(echo $download_speed |
|
||||
awk -F, '{ printf("%d",(($7 / 1000000) + 0.5)) }')"
|
||||
Reference in New Issue
Block a user