mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-03-20 01:37:45 +01:00
add dmenu script for power state management under a single command
This commit is contained in:
parent
6f4c012edb
commit
98575fbe62
@ -36,9 +36,7 @@ super + Scroll_Lock
|
||||
super + Insert
|
||||
showclip
|
||||
super + shift + x
|
||||
prompt "Shutdown computer?" "sudo -A shutdown -h now"
|
||||
super + shift + BackSpace
|
||||
prompt "Reboot computer?" "sudo -A shutdown -r now"
|
||||
dmenulogout
|
||||
super + x
|
||||
mpc pause; pauseallmpv; i3lock -e -f -c 1d2021; xset dpms force off
|
||||
XF86Launch1
|
||||
|
||||
13
.local/bin/i3cmds/dmenulogout
Executable file
13
.local/bin/i3cmds/dmenulogout
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
MESSAGE="lock\\nexit\\nsuspend\\nhibernate\\nreboot\\nshutdown"
|
||||
ACTION="$(printf "$MESSAGE" | dmenu -l 6 -i -p "Do what now?")"
|
||||
|
||||
case "$ACTION" in
|
||||
"lock") i3lock -n -c 222222 ;;
|
||||
"exit") i3-msg exit ;;
|
||||
"suspend") systemctl suspend ;;
|
||||
"hibernate") systemctl hibernate ;;
|
||||
"reboot") systemctl reboot ;;
|
||||
"shutdown") systemctl poweroff -i ;;
|
||||
esac
|
||||
Loading…
x
Reference in New Issue
Block a user