fix(waybar): Custom scripts
This commit is contained in:
parent
6005ee646c
commit
411590d12c
3 changed files with 20 additions and 9 deletions
|
|
@ -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": "<tt>%q</tt>", "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
|
||||
|
||||
|
|
|
|||
|
|
@ -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}",
|
||||
|
|
|
|||
|
|
@ -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%);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue