wayland: Set wallpapers for all connected screens

Changes the wallpaper setting code on startup to set a wallpaper for
each screen that it finds currently connected. Still a bit hacky and
should be improved for reactive wallpaper setting as new screens are
connected/disconnected but should work for the moment.
This commit is contained in:
Marty Oehme 2022-12-24 16:44:59 +01:00
parent 660f6b0ca6
commit 2bff4dfe76
Signed by: Marty
GPG Key ID: 73BA40D5AFAF49C9
1 changed files with 9 additions and 6 deletions

View File

@ -228,12 +228,15 @@ done
setxkbmap -option "compose:menu"
# set a nice wallpaper
exec swww init &
if [ -e "$HOME/pictures/wall_l.jpg" ] && [ -e "$HOME/pictures/wall_r.jpg" ]; then
swww img -o DP-5 "$HOME/pictures/wall_l.jpg" &
swww img -o DP-3 "$HOME/pictures/wall_r.jpg" &
elif [ -e "$HOME/pictures/wall.jpg" ]; then
swww img "$HOME/pictures/wall.jpg" &
if exist wlopm && exist swww; then
exec swww init &
if [ -e "$HOME/pictures/wall.jpg" ]; then
swww img "$HOME/pictures/wall.jpg" &
fi
if wlopm | grep -q DP-5 && wlopm | grep -q DP-3 && [ -e "$HOME/pictures/wall_l.jpg" ] && [ -e "$HOME/pictures/wall_r.jpg" ]; then
swww img -o DP-5 "$HOME/pictures/wall_l.jpg" &
swww img -o DP-3 "$HOME/pictures/wall_r.jpg" &
fi
fi
# killall mako