sway: update sway_exit script with icons, adapt sway_suspend, update config accordingly

This commit is contained in:
Konstantin Koslowski 2022-04-21 01:42:42 +02:00
parent 0271bfb5d9
commit ac387d4c1b
3 changed files with 28 additions and 9 deletions

View file

@ -1,4 +1,20 @@
#!/bin/bash
export PATH=$PATH:$HOME/.config/sway/bin
bash -c "$(echo -e 'sway_lock lock\nsystemctl suspend\nswaymsg reload\nswaymsg exit' | \
wofi --dmenu --prompt 'exit menu')"
IMG_BASE=$HOME/.local/share/icons/Tela-circle-dark
IMG_LOCK=$IMG_BASE/scalable/apps/system-log-out.svg
CMD_LOCK="sway_lock lock"
IMG_SUSPEND=$IMG_BASE/scalable/apps/system-suspend.svg
CMD_SUSPEND="sway_suspend suspend"
IMG_RELOAD=$IMG_BASE/scalable/apps/system-software-update.svg
CMD_RELOAD="swaymsg reload"
IMG_EXIT=$IMG_BASE/scalable/apps/system-restart.svg
CMD_EXIT="swaymsg exit"
echo -e "img:$IMG_LOCK:text:$CMD_LOCK
img:$IMG_SUSPEND:text:$CMD_SUSPEND
img:$IMG_RELOAD:text:$CMD_RELOAD
img:$IMG_EXIT:text:$CMD_EXIT" | \
wofi --dmenu --prompt "exit menu" | while read line; do
bash -c "$line"
done