summary refs log tree commit diff
path: root/.config/waybar/modules
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2023-01-07 19:41:47 +0100
committerRobert Günzler <r@gnzler.io>2023-01-07 19:54:48 +0100
commitb9c14ef8bd5b0441c4ed6e544d7dbd5adb12e25a (patch)
tree972fa420b24a5ad4deb1776bf1bd8751fb3a3df2 /.config/waybar/modules
parent927dbee46ea6818890c8d36b71c23f8058d29b42 (diff)
waybar: cleanup
Signed-off-by: Robert Günzler <r@gnzler.io>
Diffstat (limited to '.config/waybar/modules')
-rwxr-xr-x.config/waybar/modules/timetracked.sh4
-rwxr-xr-x.config/waybar/modules/vpn.sh7
2 files changed, 10 insertions, 1 deletions
diff --git a/.config/waybar/modules/timetracked.sh b/.config/waybar/modules/timetracked.sh
index 52611a3..4e384bf 100755
--- a/.config/waybar/modules/timetracked.sh
+++ b/.config/waybar/modules/timetracked.sh
@@ -3,6 +3,10 @@
 set -e
 [ -n "$DEBUG" ] && set -x
 
+if ! command -v timetrace >/dev/null 2>&1; then
+	exit 0
+fi
+
 case "$1" in
 on-click)
 	timetrace status >/dev/null && timetrace stop
diff --git a/.config/waybar/modules/vpn.sh b/.config/waybar/modules/vpn.sh
index 4fc5bdd..c4d50fa 100755
--- a/.config/waybar/modules/vpn.sh
+++ b/.config/waybar/modules/vpn.sh
@@ -3,6 +3,10 @@
 set -e
 [ -n "$DEBUG" ] && set -x
 
+case "$1" in
+toggle) exit 1 ;;
+esac
+
 extern_ip=$(curl -SsfL http://api.ipify.org/?format=text)
 
 vpn_is_up() {
@@ -13,7 +17,8 @@ vpn_is_up() {
 }
 
 if vpn_is_up; then
-	printf '{"text": "󰒃 ", "tooltip": "external ip is %s"}\n' "$extern_ip"
+	printf '{"text": "󰒃", "tooltip": "external ip is %s"}\n' "$extern_ip"
 else
+	# printf '{"text": "󰦜", "tooltip": "disconnected"}\n'
 	printf '{}\n'
 fi