add power menu
This commit is contained in:
parent
fdd7dd56fe
commit
f72e228239
@ -38,7 +38,6 @@ bindsym --to-code $mod+Shift+r reload
|
|||||||
|
|
||||||
set $menu rofi -show drun -m -1
|
set $menu rofi -show drun -m -1
|
||||||
bindsym --to-code $mod+d exec $menu
|
bindsym --to-code $mod+d exec $menu
|
||||||
bindsym $mod+o exec --no-startup-id slm_rofi
|
|
||||||
|
|
||||||
# Change focus
|
# Change focus
|
||||||
bindsym --to-code $mod+h focus left
|
bindsym --to-code $mod+h focus left
|
||||||
@ -112,6 +111,8 @@ mode $exitmode {
|
|||||||
}
|
}
|
||||||
bindsym --to-code $mod+x mode $exitmode
|
bindsym --to-code $mod+x mode $exitmode
|
||||||
|
|
||||||
|
bindsym --to-code $mod+Shift+x exec --no-startup-id ~/.config/sway/scripts/power-menu.sh
|
||||||
|
|
||||||
# switch to workspace
|
# switch to workspace
|
||||||
bindsym --to-code $mod+1 workspace number $ws1
|
bindsym --to-code $mod+1 workspace number $ws1
|
||||||
bindsym --to-code $mod+2 workspace number $ws2
|
bindsym --to-code $mod+2 workspace number $ws2
|
||||||
|
|||||||
13
home/user/.config/sway/scripts/power-menu.sh
Executable file
13
home/user/.config/sway/scripts/power-menu.sh
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
choice=$(echo -e "Exit\nReboot\nShutdown\nSuspend\nLock\nBlack\nUEFI" | rofi -dmenu -p "Power Menu:" -i)
|
||||||
|
|
||||||
|
case "${choice}" in
|
||||||
|
Exit) swaymsg exit ;;
|
||||||
|
Reboot) systemctl reboot ;;
|
||||||
|
Shutdown) shutdown -h now ;;
|
||||||
|
Suspend) ~/.config/sway/scripts/lock-telegram.sh && systemctl suspend ;;
|
||||||
|
Lock) ~/.config/sway/scripts/lock-telegram.sh && swaylock -f ;;
|
||||||
|
Black) magick canvas:none PNG:- | feh --class black -YFx - ;;
|
||||||
|
UEFI) systemctl reboot --firmware-setup ;;
|
||||||
|
esac
|
||||||
Loading…
x
Reference in New Issue
Block a user