fix(desktop): prefer omarchy background setter

This commit is contained in:
2026-10-09 12:01:59 -04:00
parent 0ce884dfee
commit 4380be3108
+9 -5
View File
@@ -18,11 +18,6 @@ elif [[ "$2" == "-r" ]]; then
RES_ARGS="-r $3" RES_ARGS="-r $3"
fi fi
if [[ ! -x /usr/bin/awww ]]; then
echo "required awww — please install with yay -S awww" >&2
exit 0
fi
# Paths # Paths
BACKGROUNDS_DIR="$HOME/Sync/Shared/wallpapers" BACKGROUNDS_DIR="$HOME/Sync/Shared/wallpapers"
CURRENT_BACKGROUND_LINK="$HOME/.local/state/omarchy/current/background" CURRENT_BACKGROUND_LINK="$HOME/.local/state/omarchy/current/background"
@@ -46,6 +41,15 @@ if [[ ! -f "$FILE_PATH" ]]; then
exit 1 exit 1
fi fi
if [[ -x /usr/bin/omarchy-theme-bg-set ]]; then
/usr/bin/omarchy-theme-bg-set $FILE_PATH && exit 0
fi
if [[ ! -x /usr/bin/awww ]]; then
echo "required awww — please install with yay -S awww" >&2
exit 0
fi
ln -nsf "$FILE_PATH" "$CURRENT_BACKGROUND_LINK" && ln -nsf "$FILE_PATH" "$CURRENT_BACKGROUND_LINK" &&
setsid uwsm app -- awww img "$CURRENT_BACKGROUND_LINK" && setsid uwsm app -- awww img "$CURRENT_BACKGROUND_LINK" &&
exit 0 exit 0