waybar and rofi

This commit is contained in:
2025-05-17 07:24:24 +02:00
parent e0e2ae33a4
commit 95f3c3432c
36 changed files with 3420 additions and 57 deletions

View File

@ -0,0 +1,30 @@
#!/usr/bin/env bash
config="$HOME/.config/rofi/power-menu.rasi"
actions=$(echo -e " Lock\n Shutdown\n Reboot\n Suspend\n Hibernate\n󰞘 Logout")
# Display logout menu
selected_option=$(echo -e "$actions" | rofi -dmenu -i -config "${config}" || pkill -x rofi)
# Perform actions based on the selected option
case "$selected_option" in
*Lock)
loginctl lock-session
;;
*Shutdown)
systemctl poweroff
;;
*Reboot)
systemctl reboot
;;
*Suspend)
systemctl suspend
;;
*Hibernate)
systemctl hibernate
;;
*Logout)
loginctl kill-session "$XDG_SESSION_ID"
;;
esac