bin: update power menu script to handle both and hypr and niri

This commit is contained in:
Oleksandr Smirnov 2025-06-09 20:53:27 +03:00
parent 55fbba2524
commit 025b243c48
No known key found for this signature in database
3 changed files with 8 additions and 3 deletions

View file

@ -18,7 +18,12 @@ shall_continue() {
}
case $selected in
logout) shall_continue hyprctl dispatch exit ;;
logout)
case $1 in
"niri") shall_continue niri msg action quit ;;
"hypr") shall_continue hyprctl dispatch exit ;;
esac
;;
suspend) shall_continue systemctl suspend ;;
reboot) shall_continue systemctl reboot ;;
poweroff) shall_continue systemctl poweroff ;;

View file

@ -150,7 +150,7 @@ windowrulev2 = rounding 0, floating:0, onworkspace:f[1]
bind = $mod, Return, exec, $terminal
bind = $mod SHIFT, Return, exec, wofi --show drun --allow-images
bind = $mod SHIFT, Escape, exec, ~/bin/wofi-power-menu
bind = $mod SHIFT, Escape, exec, ~/bin/wofi-power-menu,hypr
bind = $mod, f, fullscreen
bind = $mod Ctrl, f, togglefloating

View file

@ -165,7 +165,7 @@ binds {
Mod+Q { close-window; }
Mod+Return { spawn "kitty"; }
Mod+Shift+Return { spawn "wofi" "--show" "drun"; }
Mod+Shift+Escape { spawn "~/bin/wofi-power-menu"; }
Mod+Shift+Escape { spawn "~/bin/wofi-power-menu" "niri";}
Super+Alt+L { spawn "swaylock"; } // TODO: change to hyprlock
// programs {{{