aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/dot_config
diff options
context:
space:
mode:
authorLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-05-13 13:43:37 +0100
committerLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-05-13 13:43:37 +0100
commit763b425de7834bfbd8b840b2a63407594c9f5c6f (patch)
treee19cb1221967f161d73de5ca0bf01ad75956aa48 /dot_config
parent7166dad8f8439bbe90c7dc0b1b48010bd87153f1 (diff)
downloaddotfiles-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')
-rw-r--r--dot_config/sway/executable_power-menu.sh10
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
+