config_sway/bin/sway_exit

20 lines
661 B
Bash
Executable file

#!/bin/bash
export PATH=$PATH:$HOME/.config/sway/bin
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