Merge branch 'dev' into rc

This commit is contained in:
David Heinemeier Hansson
2026-02-21 15:20:11 +01:00
3 changed files with 24 additions and 12 deletions
+7 -7
View File
@@ -264,10 +264,10 @@ show_setup_config_menu() {
show_setup_system_menu() { show_setup_system_menu() {
local options="" local options=""
if [[ -f ~/.local/state/omarchy/toggles/suspend-on ]]; then if [[ -f ~/.local/state/omarchy/toggles/suspend-off ]]; then
options="$options󰒲 Disable Suspend"
else
options="$options󰒲 Enable Suspend" options="$options󰒲 Enable Suspend"
else
options="$options󰒲 Disable Suspend"
fi fi
if omarchy-hibernation-available; then if omarchy-hibernation-available; then
@@ -566,17 +566,17 @@ show_about() {
} }
show_system_menu() { show_system_menu() {
local options="󱄄 Screensaver\n Lock\n󰍃 Logout" local options="󱄄 Screensaver\n Lock"
[[ -f ~/.local/state/omarchy/toggles/suspend-on ]] && options="$options\n󰒲 Suspend" [[ ! -f ~/.local/state/omarchy/toggles/suspend-off ]] && options="$options\n󰒲 Suspend"
omarchy-hibernation-available && options="$options\n󰤁 Hibernate" omarchy-hibernation-available && options="$options\n󰤁 Hibernate"
options="$options\n󰜉 Restart\n󰐥 Shutdown" options="$options\n󰍃 Logout\n󰜉 Restart\n󰐥 Shutdown"
case $(menu "System" "$options") in case $(menu "System" "$options") in
*Screensaver*) omarchy-launch-screensaver force ;; *Screensaver*) omarchy-launch-screensaver force ;;
*Lock*) omarchy-lock-screen ;; *Lock*) omarchy-lock-screen ;;
*Logout*) omarchy-system-logout ;;
*Suspend*) systemctl suspend ;; *Suspend*) systemctl suspend ;;
*Hibernate*) systemctl hibernate ;; *Hibernate*) systemctl hibernate ;;
*Logout*) omarchy-system-logout ;;
*Restart*) omarchy-cmd-reboot ;; *Restart*) omarchy-cmd-reboot ;;
*Shutdown*) omarchy-cmd-shutdown ;; *Shutdown*) omarchy-cmd-shutdown ;;
*) back_to show_main_menu ;; *) back_to show_main_menu ;;
+4 -5
View File
@@ -1,13 +1,12 @@
#!/bin/bash #!/bin/bash
STATE_FILE=~/.local/state/omarchy/toggles/suspend-on STATE_FILE=~/.local/state/omarchy/toggles/suspend-off
if [[ ! -f $STATE_FILE ]]; then if [[ -f $STATE_FILE ]]; then
mkdir -p "$(dirname $STATE_FILE)" rm -f $STATE_FILE
touch $STATE_FILE
notify-send "󰒲 Suspend now available in system menu" notify-send "󰒲 Suspend now available in system menu"
else else
mkdir -p "$(dirname $STATE_FILE)" mkdir -p "$(dirname $STATE_FILE)"
rm -f $STATE_FILE touch $STATE_FILE
notify-send "󰒲 Suspend removed from system menu" notify-send "󰒲 Suspend removed from system menu"
fi fi
+13
View File
@@ -0,0 +1,13 @@
echo "Migrate suspend toggle from opt-in to opt-out"
SUSPEND_ON=~/.local/state/omarchy/toggles/suspend-on
SUSPEND_OFF=~/.local/state/omarchy/toggles/suspend-off
if [[ -f $SUSPEND_ON ]]; then
# User had suspend enabled, remove old file (suspend is now on by default)
rm -f $SUSPEND_ON
else
# User had suspend disabled, create opt-out file to preserve their choice
mkdir -p "$(dirname $SUSPEND_OFF)"
touch $SUSPEND_OFF
fi