diff --git a/desktop/.config/river/init b/desktop/.config/river/init index a3b2bf1..1fea9e0 100755 --- a/desktop/.config/river/init +++ b/desktop/.config/river/init @@ -235,16 +235,17 @@ for pad in $(riverctl list-inputs | grep -i touchscreen); do done setxkbmap -option "compose:menu" + # set a nice wallpaper -if exist wlopm && exist swww; then +if exist swww; then riverctl spawn "swww init" - if [ -e "$HOME/pictures/wall.jpg" ]; then + outputs=$(swww query | cut -d':' -f1) + 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_r.jpg" + elif [ -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 # start status bar