mirror of
https://github.com/fscotto/infra.git
synced 2026-05-31 15:59:56 +00:00
- Add profile_desktop_common with shared desktop bootstrap (emptty, PAM, dotfiles, templates, GPG, Maildir, Flatpak, st, external tools) - Add profile_desktop_host with host-specific tasks (NVIDIA/PRIME on nymph) - Reduce profile_desktop_i3 to i3/X11-only tasks - Create profile_desktop_hyprland for Hyprland Wayland session - Add dual-session support (i3 + Hyprland) on nymph with session choice - Create shared Hyprland/Waybar dotfiles under dotfiles/desktop/ - Fix Waybar: bottom position, no persistent workspaces, sort by number - Rename host_dotfiles to host_i3_dotfiles for clarity - Make emptty restart manual by default to avoid session drops
43 lines
820 B
Bash
43 lines
820 B
Bash
#!/bin/sh
|
|
|
|
set -eu
|
|
|
|
choice="$(printf 'Shutdown\nReboot\nLogout\nLock\nSuspend' \
|
|
| rofi -dmenu \
|
|
-i \
|
|
-p 'Power' \
|
|
-theme ~/.config/rofi/config.rasi \
|
|
-theme-str 'window { width: 20%; location: center; anchor: center; } listview { columns: 1; spacing: 6px; }')"
|
|
|
|
[ -n "$choice" ] || exit 0
|
|
|
|
case "$choice" in
|
|
Lock)
|
|
"$HOME/.local/bin/lock-session"
|
|
;;
|
|
Logout)
|
|
case "${XDG_CURRENT_DESKTOP:-}" in
|
|
*Hyprland*|*hyprland*)
|
|
hyprctl dispatch exit
|
|
;;
|
|
*i3*|*I3*)
|
|
i3-msg exit
|
|
;;
|
|
*)
|
|
printf '%s\n' 'Unsupported desktop session for logout.' >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
;;
|
|
Suspend)
|
|
"$HOME/.local/bin/lock-session" || true
|
|
loginctl suspend
|
|
;;
|
|
Reboot)
|
|
loginctl reboot
|
|
;;
|
|
Shutdown)
|
|
loginctl poweroff
|
|
;;
|
|
esac
|