power
This commit is contained in:
parent
f53eaf80c0
commit
bb8e839d1a
2 changed files with 11 additions and 4 deletions
|
@ -1,12 +1,17 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Prompt for power options using dmenu
|
# Prompt for power options using dmenu
|
||||||
|
|
||||||
option=$(printf "Shutdown\nRestart\nLog out" | menu "Power:")
|
option=$(printf "Shutdown\nRestart\nLog out" | ~/.config/scripts/menu/menu "Power:")
|
||||||
|
|
||||||
|
slogout() {
|
||||||
|
killall xinit
|
||||||
|
swaymsg exit
|
||||||
|
}
|
||||||
|
|
||||||
case "$option" in
|
case "$option" in
|
||||||
"Shutdown") sudo poweroff ;;
|
"Shutdown") systemctl poweroff ;;
|
||||||
"Restart") sudo reboot ;;
|
"Restart") systemctl reboot ;;
|
||||||
"Log out") killall xinit;;
|
"Log out") slogout;;
|
||||||
*) exit 1 ;;
|
*) exit 1 ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@ set $micdown ~/.config/scripts/micdown
|
||||||
set $micmute ~/.config/scripts/micmute
|
set $micmute ~/.config/scripts/micmute
|
||||||
set $brightup ~/.config/scripts/brightup
|
set $brightup ~/.config/scripts/brightup
|
||||||
set $brightdown ~/.config/scripts/brightdown
|
set $brightdown ~/.config/scripts/brightdown
|
||||||
|
set $powermenu ~/.config/scripts/menu/menu-power
|
||||||
|
|
||||||
# Keybinds
|
# Keybinds
|
||||||
floating_modifier $mod normal
|
floating_modifier $mod normal
|
||||||
|
@ -54,6 +55,7 @@ bindsym XF86MonBrightnessUp exec $brightup
|
||||||
bindsym XF86MonBrightnessDown exec $brightdown
|
bindsym XF86MonBrightnessDown exec $brightdown
|
||||||
# -
|
# -
|
||||||
bindsym $mod+Shift+q exec swaymsg exit
|
bindsym $mod+Shift+q exec swaymsg exit
|
||||||
|
bindsym $mod+p exec $powermenu
|
||||||
bindsym $mod+q reload
|
bindsym $mod+q reload
|
||||||
bindsym $mod+c kill
|
bindsym $mod+c kill
|
||||||
# -
|
# -
|
||||||
|
|
Loading…
Reference in a new issue