Add power menu to hyprland

This commit is contained in:
KoenDR06 2026-01-19 17:22:12 +01:00
parent 4e7fcaf3a5
commit c5c233509c
2 changed files with 23 additions and 0 deletions

12
misc/power-menu.sh Executable file
View file

@ -0,0 +1,12 @@
cmds=('shutdown now' 'reboot' 'hyprlock' 'hyprctl dispatch exit')
count=${#cmds[@]}
default=15
lines=$((count > default ? default : count))
a=$(printf ' Shut down\n Reboot\n Lock\n Log out' | fuzzel --dmenu --index --lines $lines --placeholder "Power action: " -I)
if [ -n "$a" ]; then
${cmds[a]}
fi