waybar: add Help module, run help overlay on demand

This commit is contained in:
Aleksey Samoilov 2024-01-28 17:19:15 +04:00
parent f487ab78fb
commit 12183033bf
3 changed files with 13 additions and 1 deletions

View file

@ -7,6 +7,7 @@
"modules-right": [
"tray",
"custom/playerctl",
"custom/help",
"custom/wlsunset",
"idle_inhibitor",
"custom/dunst",
@ -72,6 +73,12 @@
"signal": 5
},
"custom/help": {
"format": "",
"on-click": "/usr/share/sway/scripts/help.sh --toggle",
"tooltip": "false"
},
"custom/wlsunset": {
"interval": "once",
"tooltip": true,

View file

@ -70,6 +70,7 @@ window#waybar.hidden {
}
#clock,
#custon-help,
#custom-playerctl,
#custom-power,
#custom-wlsunset,
@ -111,6 +112,10 @@ window#waybar.hidden {
color: @pink;
}
#custom-help {
color: @rosewater;
}
#custom-wlsunset {
color: @mauve;
}

View file

@ -10,6 +10,6 @@ if [ "$1" = "--toggle" ]; then
else
pkill -f -${QUIT_SIGNAL} nwg-wrapper
for output in $(swaymsg -t get_outputs --raw | jq -r '.[].name'); do
nwg-wrapper -o "$output" -sv ${VISIBILITY_SIGNAL} -sq ${QUIT_SIGNAL} -s help.sh -p left -a end &
nwg-wrapper -o "$output" -i -sv ${VISIBILITY_SIGNAL} -sq ${QUIT_SIGNAL} -s help.sh -p left -a end &
done
fi