river: Fix wallpaper screen order

Since reorganizing my screens we have to switch the output
order of wallpapers. Would be really useful to be able to
talk to `swww` like kanshi with the full screen ID instead
of just the output number for wallpaper setting.
This commit is contained in:
Marty Oehme 2024-02-24 09:08:44 +01:00
parent 572f7b29a4
commit ffededb995
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -250,8 +250,8 @@ if exist swww; then
riverctl spawn "swww init" riverctl spawn "swww init"
outputs=$(swww query | cut -d':' -f1) outputs=$(swww query | cut -d':' -f1)
if [ "$(echo "$outputs" | grep -c -e '^DP')" -eq 2 ] && [ -e "$HOME/pictures/wall_r.jpg" ]; then if [ "$(echo "$outputs" | grep -c -e '^DP')" -eq 2 ] && [ -e "$HOME/pictures/wall_r.jpg" ]; then
swww img -o "$(echo "$outputs" | tail -n1)" "$HOME/pictures/wall_l.jpg" swww img -o "$(echo "$outputs" | head -n1)" "$HOME/pictures/wall_l.jpg"
swww img -o "$(echo "$outputs" | head -n1)" "$HOME/pictures/wall_r.jpg" swww img -o "$(echo "$outputs" | tail -n1)" "$HOME/pictures/wall_r.jpg"
elif [ -e "$HOME/pictures/wall.jpg" ]; then elif [ -e "$HOME/pictures/wall.jpg" ]; then
swww img "$HOME/pictures/wall.jpg" swww img "$HOME/pictures/wall.jpg"
fi fi