From 2bff4dfe76bc010e9e8f74493001a70755f22198 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 24 Dec 2022 16:44:59 +0100 Subject: [PATCH] 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. --- wayland/.config/river/init | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/wayland/.config/river/init b/wayland/.config/river/init index 65e2300..04ee534 100755 --- a/wayland/.config/river/init +++ b/wayland/.config/river/init @@ -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