From cf71a3f1016d74d2f089911c020195b7ee6c298e Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 19 Jul 2025 15:11:32 -0500 Subject: [PATCH] Ensure apps started with uwsm stay managed by uwsm on restarts --- bin/omarchy-theme-bg-next | 4 ++-- bin/omarchy-toggle-idle | 2 +- default/bash/functions | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/omarchy-theme-bg-next b/bin/omarchy-theme-bg-next index 39e0b77..1502db8 100755 --- a/bin/omarchy-theme-bg-next +++ b/bin/omarchy-theme-bg-next @@ -11,7 +11,7 @@ TOTAL=${#BACKGROUNDS[@]} if [[ $TOTAL -eq 0 ]]; then notify-send "No background was found for theme" -t 2000 pkill -x swaybg - setsid swaybg --color '#000000' >/dev/null 2>&2 & + uwsm app -- swaybg --color '#000000' >/dev/null 2>&1 & else # Get current background from symlink if [[ -L "$CURRENT_BACKGROUND_LINK" ]]; then @@ -44,5 +44,5 @@ else # Relaunch swaybg pkill -x swaybg - setsid swaybg -i "$NEW_BACKGROUND" -m fill >/dev/null 2>&2 & + uwsm app -- swaybg -i "$NEW_BACKGROUND" -m fill >/dev/null 2>&1 & fi diff --git a/bin/omarchy-toggle-idle b/bin/omarchy-toggle-idle index ccbc012..a195461 100755 --- a/bin/omarchy-toggle-idle +++ b/bin/omarchy-toggle-idle @@ -4,6 +4,6 @@ if pgrep -x hypridle >/dev/null; then pkill -x hypridle notify-send "Stop locking computer when idle" else - setsid hypridle &>/dev/null & + uwsm app -- hypridle >/dev/null 2>&1 & notify-send "Now locking computer when idle" fi diff --git a/default/bash/functions b/default/bash/functions index cb84c3c..b1657c5 100644 --- a/default/bash/functions +++ b/default/bash/functions @@ -69,5 +69,5 @@ web2app-remove() { # Ensure changes to ~/.XCompose are immediately available refresh-xcompose() { pkill fcitx5 - setsid fcitx5 &>/dev/null & + uwsm app -- fcitx5 >/dev/null 2>&1 & }