diff --git a/scripts/toggle-tailscale.sh b/scripts/toggle-tailscale.sh index 0263c29..6f79489 100755 --- a/scripts/toggle-tailscale.sh +++ b/scripts/toggle-tailscale.sh @@ -19,15 +19,24 @@ while getopts ":g" option; do if [ "${current_state}" == "${STOPPED_MSG}" ]; then state='disconnected' tooltip='Connect tailnet' + + printf '{"alt": "%s", "tooltip": "%s", "class": "%s" }' \ + "${state}" "${tooltip}" "${state}" else state='connected' tooltip="${status:='Disconnect tailnet'}" + + printf '{"alt": "%s", "tooltip": "%q", "class": "%s" }' \ + "${state}" "${tooltip}" "${state}" fi - printf '{"alt": "%s", "tooltip": "%q", "class": "%s" }' \ - "${state}" "${tooltip}" "${state}" exit 0 ;; + + *) + echo 'Invalid option' + exit 1 + ;; esac done diff --git a/stow/waybar/.config/waybar/modules.json b/stow/waybar/.config/waybar/modules.json index ab8551b..447f9ba 100644 --- a/stow/waybar/.config/waybar/modules.json +++ b/stow/waybar/.config/waybar/modules.json @@ -122,7 +122,8 @@ }, "custom/toggle-light-dark": { - "exec": "sleep 1 && bash ~/projects/sisyphus/scripts/toggle-light-dark.sh -g", + "exec": "bash ~/projects/sisyphus/scripts/toggle-light-dark.sh -g", + "interval": 60, "return-type": "json", "on-click": "bash ~/projects/sisyphus/scripts/toggle-light-dark.sh", "format": "{icon}", @@ -134,19 +135,21 @@ }, "custom/toggle-notifications": { - "exec": "sleep 6 && bash ~/projects/sisyphus/scripts/toggle-notifications.sh -g", + "exec": "bash ~/projects/sisyphus/scripts/toggle-notifications.sh -g", + "interval": 60, "return-type": "json", "on-click": "bash ~/projects/sisyphus/scripts/toggle-notifications.sh", - "format": "NOTIS {icon}", + "format": "{icon}", "format-icons": { - "normal": "NRML", - "paused": "PAISED" + "normal": "\uf0f3", /*  */ + "paused": "\uf1f6" /*  */ }, "tooltip": true }, "custom/toggle-tailscale": { - "exec": "sleep 2 && bash ~/projects/sisyphus/scripts/toggle-tailscale.sh -g", + "exec": "bash ~/projects/sisyphus/scripts/toggle-tailscale.sh -g", + "interval": 60, "return-type": "json", "on-click": "bash ~/projects/sisyphus/scripts/toggle-tailscale.sh", "format": "{icon}", diff --git a/stow/waybar/.config/waybar/style.css b/stow/waybar/.config/waybar/style.css index 11d3b20..ecc08fc 100644 --- a/stow/waybar/.config/waybar/style.css +++ b/stow/waybar/.config/waybar/style.css @@ -62,7 +62,6 @@ window#waybar { opacity: 0.6; } - #mpris.Feishin { background: linear-gradient(45deg, rgba(170,92,195,1) 100%, rgba(0,164,220,1) 0%); }