Almamu / linux-wallpaperengine

Wallpaper Engine backgrounds for Linux!
GNU General Public License v3.0
1.65k stars 61 forks source link

Different wallpapers on multiple screens #122

Closed YingchangLiu closed 1 year ago

YingchangLiu commented 2 years ago

I have two screens and write a script to draw two wallpapers on them. Now the screen will flash in sequence, as if they are iteratively refreshing the wallpaper. Is there a way to display different wallpapers on multiple screens?

  #!/bin/bash
  while true; do
     #echo  $image
     killall wallengine 2>/dev/null
     image1=~/Games/Steam/steamapps/workshop/content/431960/$(ls ~/Games/Steam/steamapps/workshop/content/431960/ | shuf -n 1)
     image2=~/Games/Steam/steamapps/workshop/content/431960/$(ls ~/Games/Steam/steamapps/workshop/content/431960/ | shuf -n 1)

     ~/dotfile/config/wallengine/wallpaperengine/build/wallengine \
          --screen-root DP-1 \
          --assets-dir ~/Games/Steam/steamapps/common/wallpaper_engine/assets \
          --fps 30 \
          --silent \
          $image1   &

     ~/dotfile/config/wallengine/wallpaperengine/build/wallengine \
          --screen-root DP-2 \
         --assets-dir ~/Games/Steam/steamapps/common/wallpaper_engine/assets \
         --fps 30 \
         --silent \
         $image2   &

          #--volume 100
     sleep 29m
  done
  sleep 1m
Almamu commented 2 years ago

There's currently no way of doing this as the tool draws to the whole desktop, that's why you see the flashing. It is a planned feature that will come in the future.

YingchangLiu commented 2 years ago

Got it. Looking forward to your release.

Almamu commented 1 year ago

This feature should be supported for X11 background mode (--screen-root), for example, the command you showed before now would be something like this: ` image1=$(ls ~/Games/Steam/steamapps/workshop/content/431960/ | shuf -n 1) image2=$(ls ~/Games/Steam/steamapps/workshop/content/431960/ | shuf -n 1)

 ~/dotfile/config/wallengine/wallpaperengine/build/wallengine \
      --screen-root DP-1 --bg $image1 \
      --screen-root DP-2 --bg $image2 \
      --fps 30 \
      --silent

` Assets dir and full path to the backgrounds (when using Steam-dowloaded ones) should be automatically detected.

Closing the issue, please open a new one if any issues with this arise.

Gustash commented 9 months ago

@Almamu this seems to no longer be possible after the last update, which got rid of the --bg arg for a positional argument. Here is the command that I'm running, which should be displaying a separate background in each monitor:

linux-wallpaperengine --silent \
                      --screenshot /tmp/wallengine.jpeg \
                      -r DP-1 2164591875 \
                      -r DP-2 2927308359
Almamu commented 9 months ago

@Gustash

@Almamu this seems to no longer be possible after the last update, which got rid of the --bg arg for a positional argument. Here is the command that I'm running, which should be displaying a separate background in each monitor:

linux-wallpaperengine --silent \
                      --screenshot /tmp/wallengine.jpeg \
                      -r DP-1 2164591875 \
                      -r DP-2 2927308359

The --bg option is actually still supported, was just missing from the help prompt. I've pushed a commit that fixes the support as it seems that at some point, if you didn't specify a default background, only the help info would show. This should restore how it worked before.