Rofi scripts for extra menus

This commit is contained in:
2026-07-02 07:04:59 +02:00
parent ccd02e718b
commit d3c89f89f6
2 changed files with 89 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
#!/usr/bin/env bash
# rofi-power-menu: logout / restart / shutdown via rofi
set -euo pipefail
options=" Logout\n Restart\n Shutdown"
chosen=$(echo -e "$options" | rofi -dmenu -i -p "Power" -markup-rows \
-theme-str 'listview { lines: 3; }' \
-theme-str 'window { height: 240px; }')
[ -z "$chosen" ] && exit 0
case "$chosen" in
*Logout*)
awesome-client "awesome.quit()" 2>/dev/null || echo "awesome.quit()" | awesome-client
;;
*Restart*)
loginctl reboot
;;
*Shutdown*)
loginctl poweroff
;;
esac