clone of my dotfiles.ssp.sh
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

merge new changes to my scripts

sspaeti 813ce3eb 74c80e9f

+44 -30
+10
hypr/.config/hypr/sspaeti/omarchy-menu-flat
··· 29 29 Toggle Nightlight 30 30 Toggle Idle Lock 31 31 Toggle Waybar 32 + Toggle Workspace Layout 33 + Toggle Window Gaps 34 + Toggle 1-Window Ratio 35 + Toggle Display Scaling 32 36 Audio 33 37 Wifi 34 38 Bluetooth ··· 102 106 Lock Screen 103 107 Launch Screensaver 104 108 Suspend 109 + Logout 105 110 Relaunch Hyprland 106 111 Restart System 107 112 Shutdown System" | omarchy-launch-walker --dmenu --width 295 --minheight 1 --maxheight 600 -p "Action…" 2>/dev/null) ··· 136 141 "Toggle Nightlight") omarchy-toggle-nightlight ;; 137 142 "Toggle Idle Lock") omarchy-toggle-idle ;; 138 143 "Toggle Waybar") omarchy-toggle-waybar ;; 144 + "Toggle Workspace Layout") omarchy-hyprland-workspace-layout-toggle ;; 145 + "Toggle Window Gaps") omarchy-hyprland-window-gaps-toggle ;; 146 + "Toggle 1-Window Ratio") omarchy-hyprland-window-single-square-aspect-toggle ;; 147 + "Toggle Display Scaling") omarchy-hyprland-monitor-scaling-cycle ;; 139 148 140 149 "Audio") 141 150 logger -t "omarchy-menu-flat2" "Launching: $TERMINAL --class=Wiremix -e wiremix" ··· 224 233 "Lock Screen") omarchy-lock-screen ;; 225 234 "Launch Screensaver") omarchy-launch-screensaver force ;; 226 235 "Suspend") systemctl suspend ;; 236 + "Logout") ~/.config/hypr/sspaeti/omarchy-system-menu-intercept logout ;; 227 237 "Relaunch Hyprland") uwsm stop ;; 228 238 "Restart System") ~/.config/hypr/sspaeti/omarchy-system-menu-intercept reboot ;; 229 239 "Shutdown System") ~/.config/hypr/sspaeti/omarchy-system-menu-intercept poweroff ;;
+10 -5
hypr/.config/hypr/sspaeti/omarchy-system-menu
··· 13 13 local extra="$3" 14 14 15 15 read -r -a args <<<"$extra" 16 - echo -e "$options" | walker --dmenu --theme dmenu_250 -p "$prompt…" "${args[@]}" 16 + echo -e "$options" | omarchy-launch-walker --dmenu --width 295 --minheight 1 --maxheight 630 -p "$prompt…" "${args[@]}" 2>/dev/null 17 17 } 18 18 19 19 handle_tmux_and_poweroff() { ··· 26 26 ~/.config/hypr/sspaeti/omarchy-system-menu-intercept reboot 27 27 } 28 28 29 + handle_tmux_and_logout() { 30 + # Use the intercept script for tmux-aware logout 31 + ~/.config/hypr/sspaeti/omarchy-system-menu-intercept logout 32 + } 33 + 29 34 # Build menu options dynamically based on system capabilities 30 - options=" Lock\n󱄄 Screensaver" 31 - [ ! -f ~/.local/state/omarchy/toggles/suspend-off ] && options="$options\n󰒲 Suspend" 35 + options=" Lock" 36 + [[ ! -f ~/.local/state/omarchy/toggles/suspend-off ]] && options="$options\n󰒲 Suspend" 32 37 omarchy-hibernation-available && options="$options\n󰤁 Hibernate" 33 - options="$options\n󰜉 Restart\n󰐥 Shutdown" 38 + options="$options\n󰍃 Logout\n󰜉 Restart\n󰐥 Shutdown" 34 39 35 40 case $(menu "System" "$options") in 36 41 *Lock*) omarchy-lock-screen ;; 37 - *Screensaver*) omarchy-launch-screensaver force ;; 38 42 *Suspend*) systemctl suspend ;; 39 43 *Hibernate*) systemctl hibernate ;; 44 + *Logout*) handle_tmux_and_logout ;; 40 45 *Restart*) handle_tmux_and_reboot ;; 41 46 *Shutdown*) handle_tmux_and_poweroff ;; 42 47 esac
+24 -25
hypr/.config/hypr/sspaeti/omarchy-system-menu-intercept
··· 6 6 7 7 export PATH="$HOME/.local/share/omarchy/bin:$PATH" 8 8 9 - if [[ "$1" == "poweroff" ]]; then 10 - # Log to both journal and persistent file 11 - logger -t "omarchy-shutdown" "Shutdown script called - poweroff" 12 - echo "$(date): Shutdown script called - poweroff" >> /var/log/omarchy-shutdown.log 13 - # Save tmux sessions and close gracefully before shutdown 9 + save_and_kill_tmux() { 14 10 if command -v tmux &> /dev/null && tmux list-sessions &> /dev/null; then 15 11 logger -t "omarchy-shutdown" "Found tmux sessions, saving and killing" 16 12 echo "$(date): Found tmux sessions, saving and killing" >> /var/log/omarchy-shutdown.log 17 - # Save all tmux sessions using resurrect 18 13 tmux run-shell '~/.tmux/plugins/tmux-resurrect/scripts/save.sh' 19 14 sleep 2 20 - # Kill all tmux sessions gracefully with more aggressive timeout 21 15 timeout 2s tmux kill-server || logger -t "omarchy-shutdown" "tmux kill-server timed out, forcing kill" 22 16 logger -t "omarchy-shutdown" "tmux kill-server completed" 23 17 echo "$(date): tmux kill-server completed" >> /var/log/omarchy-shutdown.log 24 18 fi 25 - # Use omarchy-state to clear restart-required notifications before shutdown 19 + } 20 + 21 + if [[ "$1" == "poweroff" ]]; then 22 + logger -t "omarchy-shutdown" "Shutdown script called - poweroff" 23 + echo "$(date): Shutdown script called - poweroff" >> /var/log/omarchy-shutdown.log 24 + save_and_kill_tmux 26 25 omarchy-state clear re*-required 27 - exec /usr/bin/systemctl poweroff --no-wall 26 + # Schedule shutdown, then close all windows gracefully (matching upstream pattern) 27 + nohup bash -c "sleep 2 && systemctl poweroff --no-wall" >/dev/null 2>&1 & 28 + omarchy-hyprland-window-close-all 29 + sleep 1 28 30 elif [[ "$1" == "reboot" ]]; then 29 - # Log to both journal and persistent file 30 31 logger -t "omarchy-shutdown" "Shutdown script called - reboot" 31 32 echo "$(date): Shutdown script called - reboot" >> /var/log/omarchy-shutdown.log 32 - # Save tmux sessions and close gracefully before restart 33 - if command -v tmux &> /dev/null && tmux list-sessions &> /dev/null; then 34 - logger -t "omarchy-shutdown" "Found tmux sessions, saving and killing" 35 - echo "$(date): Found tmux sessions, saving and killing" >> /var/log/omarchy-shutdown.log 36 - # Save all tmux sessions using resurrect 37 - tmux run-shell '~/.tmux/plugins/tmux-resurrect/scripts/save.sh' 38 - sleep 2 39 - # Kill all tmux sessions gracefully with more aggressive timeout 40 - timeout 2s tmux kill-server || logger -t "omarchy-shutdown" "tmux kill-server timed out, forcing kill" 41 - logger -t "omarchy-shutdown" "tmux kill-server completed" 42 - echo "$(date): tmux kill-server completed" >> /var/log/omarchy-shutdown.log 43 - fi 44 - # Use omarchy-state to clear restart-required notifications before reboot 33 + save_and_kill_tmux 45 34 omarchy-state clear re*-required 46 - exec /usr/bin/systemctl reboot --no-wall 35 + # Schedule reboot, then close all windows gracefully (matching upstream pattern) 36 + nohup bash -c "sleep 2 && systemctl reboot --no-wall" >/dev/null 2>&1 & 37 + omarchy-hyprland-window-close-all 38 + sleep 1 39 + elif [[ "$1" == "logout" ]]; then 40 + logger -t "omarchy-shutdown" "Shutdown script called - logout" 41 + echo "$(date): Shutdown script called - logout" >> /var/log/omarchy-shutdown.log 42 + save_and_kill_tmux 43 + # Schedule session stop, then close all windows gracefully (matching upstream pattern) 44 + nohup bash -c "sleep 2 && uwsm stop" >/dev/null 2>&1 & 45 + omarchy-hyprland-window-close-all 46 + sleep 1 47 47 else 48 - # For all other systemctl commands, pass through normally 49 48 exec /usr/bin/systemctl "$@" 50 49 fi