diff --git a/desktop/.config/river/init b/desktop/.config/river/init index d7b86d1..f60427b 100755 --- a/desktop/.config/river/init +++ b/desktop/.config/river/init @@ -270,12 +270,18 @@ setxkbmap -option "compose:menu" [ "$(pidof kanshi)" -eq 0 ] || riverctl spawn kanshi # set a nice wallpaper -if exist swww; then - riverctl spawn "swww init" +if exist swaybg; then + killall swaybg + riverctl spawn "swaybg \ + -o 'LG Electronics W2442 0x000574E1' -i pictures/wall_l.jpg \ + -o 'LG Electronics W2442 0x000574FD' -i pictures/wall_r.jpg \ + " +elif exist swww; then + riverctl spawn "swww-daemon" 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" | head -n1)" "$HOME/pictures/wall_r.jpg" - 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" | tail -n1)" "$HOME/pictures/wall_r.jpg" elif [ -e "$HOME/pictures/wall.jpg" ]; then swww img "$HOME/pictures/wall.jpg" fi