Backgrounds

This commit is contained in:
2026-03-30 19:40:32 +01:00
parent 1c845777e8
commit b27f3fa744
5 changed files with 54 additions and 33 deletions

View File

@@ -17,4 +17,13 @@ wal -i "$CURRENT_BACKGROUND_LINK"
# Kill existing swaybg and start new one
pkill -x swaybg
setsid uwsm-app -- swaybg -i "$CURRENT_BACKGROUND_LINK" -m fill >/dev/null 2>&1 &
if [[ $(hyprctl monitors -j | jq 'length') -eq 2 ]]; then
station-bg-split "$CURRENT_BACKGROUND_LINK" "/tmp/bg"
first_mon=$(hyprctl monitors -j | jq -r '.[0].name')
second_mon=$(hyprctl monitors -j | jq -r '.[1].name')
setsid uwsm-app -- swaybg -o "$first_mon" -i /tmp/bg/background_left -m fill >/dev/null 2>&1 &
setsid uwsm-app -- swaybg -o "$second_mon" -i /tmp/bg/background_right -m fill >/dev/null 2>&1 &
else
setsid uwsm-app -- swaybg -i "$CURRENT_BACKGROUND_LINK" -m fill >/dev/null 2>&1 &
fi