diff options
| author | 2026-05-13 13:43:37 +0100 | |
|---|---|---|
| committer | 2026-05-13 13:43:37 +0100 | |
| commit | 763b425de7834bfbd8b840b2a63407594c9f5c6f (patch) | |
| tree | e19cb1221967f161d73de5ca0bf01ad75956aa48 /dot_config/sway | |
| parent | 7166dad8f8439bbe90c7dc0b1b48010bd87153f1 (diff) | |
| download | dotfiles-763b425de7834bfbd8b840b2a63407594c9f5c6f.tar.gz dotfiles-763b425de7834bfbd8b840b2a63407594c9f5c6f.tar.bz2 dotfiles-763b425de7834bfbd8b840b2a63407594c9f5c6f.zip | |
refactor(power-menu): use wofi (vim nav) and systemctl (polkit)
- wofi --dmenu --hide-search: pure j/k arrow-key picker, no fuzzy
search field. Matches existing wofi config (key_up/key_down already
include j/k).
- systemctl reboot/poweroff/suspend instead of sudo: rely on polkit,
which permits these for active session users by default — no
passwordless sudo required.
Diffstat (limited to 'dot_config/sway')
| -rw-r--r-- | dot_config/sway/executable_power-menu.sh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/dot_config/sway/executable_power-menu.sh b/dot_config/sway/executable_power-menu.sh index 4aebcf6..edb5949 100644 --- a/dot_config/sway/executable_power-menu.sh +++ b/dot_config/sway/executable_power-menu.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Keyboard-driven power menu via fuzzel --dmenu. +# Keyboard-driven power menu via wofi --dmenu (j/k navigation). set -eu choice=$(printf '%s\n' \ @@ -8,12 +8,14 @@ choice=$(printf '%s\n' \ " Logout" \ " Reboot" \ " Poweroff" \ - | fuzzel --dmenu --prompt='power: ' --lines=5 --width=20) + | wofi --dmenu --hide-search --prompt='power' \ + --style "$HOME/.config/wofi/style.css") case "$choice" in *Lock) playerctl -a pause; exec swaylock -f -e -c 000000 ;; *Suspend) playerctl -a pause; exec systemctl suspend ;; *Logout) exec swaymsg exit ;; - *Reboot) exec sudo /usr/bin/reboot ;; - *Poweroff) exec sudo /usr/bin/poweroff ;; + *Reboot) exec systemctl reboot ;; + *Poweroff) exec systemctl poweroff ;; esac + |
