sway: add poweroff
This commit is contained in:
parent
664d6443e3
commit
1c6430fda8
2 changed files with 9 additions and 3 deletions
|
@ -4,9 +4,11 @@ IMG_BASE=$HOME/.local/share/icons/Tela-circle-dark
|
||||||
IMG_LOCK=$IMG_BASE/scalable/apps/system-log-out.svg
|
IMG_LOCK=$IMG_BASE/scalable/apps/system-log-out.svg
|
||||||
CMD_LOCK="sway_lock lock"
|
CMD_LOCK="sway_lock lock"
|
||||||
IMG_SUSPEND=$IMG_BASE/scalable/apps/system-suspend.svg
|
IMG_SUSPEND=$IMG_BASE/scalable/apps/system-suspend.svg
|
||||||
CMD_SUSPEND="sway_suspend suspend"
|
CMD_SUSPEND="sway_power suspend"
|
||||||
IMG_SUSPEND_HIB=$IMG_BASE/scalable/apps/system-suspend.svg
|
IMG_SUSPEND_HIB=$IMG_BASE/scalable/apps/system-suspend.svg
|
||||||
CMD_SUSPEND_HIB="sway_suspend suspend-hib"
|
CMD_SUSPEND_HIB="sway_power suspend-hib"
|
||||||
|
IMG_POWEROFF=$IMG_BASE/scalable/apps/kshutdown.svg
|
||||||
|
CMD_POWEROFF="sway_power poweroff"
|
||||||
IMG_RELOAD=$IMG_BASE/scalable/apps/system-software-update.svg
|
IMG_RELOAD=$IMG_BASE/scalable/apps/system-software-update.svg
|
||||||
CMD_RELOAD="swaymsg reload"
|
CMD_RELOAD="swaymsg reload"
|
||||||
IMG_EXIT=$IMG_BASE/scalable/apps/system-restart.svg
|
IMG_EXIT=$IMG_BASE/scalable/apps/system-restart.svg
|
||||||
|
@ -15,6 +17,7 @@ CMD_EXIT="swaymsg exit"
|
||||||
echo -e "img:$IMG_LOCK:text:$CMD_LOCK
|
echo -e "img:$IMG_LOCK:text:$CMD_LOCK
|
||||||
img:$IMG_SUSPEND:text:$CMD_SUSPEND
|
img:$IMG_SUSPEND:text:$CMD_SUSPEND
|
||||||
img:$IMG_SUSPEND_HIB:text:$CMD_SUSPEND_HIB
|
img:$IMG_SUSPEND_HIB:text:$CMD_SUSPEND_HIB
|
||||||
|
img:$IMG_POWEROFF:text:$CMD_POWEROFF
|
||||||
img:$IMG_RELOAD:text:$CMD_RELOAD
|
img:$IMG_RELOAD:text:$CMD_RELOAD
|
||||||
img:$IMG_EXIT:text:$CMD_EXIT" | \
|
img:$IMG_EXIT:text:$CMD_EXIT" | \
|
||||||
wofi --dmenu --prompt "exit menu" | while read line; do
|
wofi --dmenu --prompt "exit menu" | while read line; do
|
||||||
|
|
|
@ -48,8 +48,11 @@ case $1 in
|
||||||
suspend-hib)
|
suspend-hib)
|
||||||
_suspend 1 suspend-then-hibernate
|
_suspend 1 suspend-then-hibernate
|
||||||
;;
|
;;
|
||||||
|
poweroff)
|
||||||
|
systemctl poweroff
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "invalid argument: \"$1\""
|
echo "invalid argument: \"$1\""
|
||||||
echo "arguments: [inhibit [on|off]|suspend-battery|suspend-only|suspend]"
|
echo "arguments: [inhibit [on|off]|suspend-battery|suspend-only|suspend|poweroff]"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
Loading…
Reference in a new issue