Update statusbar
This commit is contained in:
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