- GTK-Style-Script und Template-System entfernt (Catppuccin fest) - 15 tote/inkompatible Scripts gelöscht (Hyprland, X11, Duplikate) - Rasi-Themes von Einzelordnern in themes/ konsolidiert - Waybar: Timezone fix, BAT0, JSON-Struktur, Icons restored - Waybar: GTK-Menu durch wlogout on-click ersetzt - Alle Script-Pfade auf /etc/xdg/rofi/themes/ aktualisiert - moonarch-session als Rofi-basierte Übergangslösung hinzugefügt - moonarch-dnd: broken pipe bei Waybar-Restart behoben - Style.css vom System übernommen
44 lines
1.1 KiB
Bash
Executable File
44 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# ABOUTME: Rofi-based session menu with horizontal icon layout.
|
|
# ABOUTME: Replaces wlogout — provides lock, logout, suspend, hibernate, reboot, shutdown.
|
|
|
|
declare -A actions
|
|
declare -a order
|
|
|
|
order=("lock" "logout" "suspend" "hibernate" "reboot" "shutdown")
|
|
|
|
actions[lock]="gtklock"
|
|
actions[logout]="niri msg action quit"
|
|
actions[suspend]="systemctl suspend"
|
|
actions[hibernate]="systemctl hibernate"
|
|
actions[reboot]="systemctl reboot"
|
|
actions[shutdown]="systemctl poweroff"
|
|
|
|
# GTK icon theme names
|
|
declare -A icons
|
|
icons[lock]="system-lock-screen"
|
|
icons[logout]="system-log-out"
|
|
icons[suspend]="system-suspend"
|
|
icons[hibernate]="system-suspend-hibernate"
|
|
icons[reboot]="system-reboot"
|
|
icons[shutdown]="system-shutdown"
|
|
|
|
# Build menu — use rofi icon protocol
|
|
menu=""
|
|
for key in "${order[@]}"; do
|
|
[[ -n "$menu" ]] && menu+="\n"
|
|
menu+="${key}\x00icon\x1f${icons[$key]}"
|
|
done
|
|
|
|
selected=$(echo -e "$menu" | rofi -dmenu \
|
|
-theme /etc/xdg/rofi/themes/session.rasi \
|
|
-show-icons \
|
|
-p "")
|
|
|
|
[[ -z "$selected" ]] && exit 0
|
|
|
|
# Execute the selected action
|
|
if [[ -n "${actions[$selected]+x}" ]]; then
|
|
eval "${actions[$selected]}"
|
|
fi
|