Different wallpapers on each workspace or monitor

Forum Forums General Tips and Tricks Different wallpapers on each workspace or monitor

  • This topic has 14 replies, 5 voices, and was last updated Apr 15-8:11 pm by Brian Masinick.
Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #91704
    Member
    zblsv

      In antiX wallpaper being set by desktop-session-wallpaper shell script. It takes desktop code as argument. Desktop code (icon manager and window manager names separated by hyphen) is held in DESKTOP_SESSION_CODE environment variable. desktop-session-wallpaper reads $HOME/.desktop-session/wallpaper-list.conf for picture filename for that desktop code and calls appropriate utilities to actually draw the picture on the root window. So we can change wallpaper-list.conf and then run desktop-session-wallpaper $DESKTOP_SESSION_CODE to change wallpaper.

      Put together:

      # change-wallpaper.sh
      # Change desktop wallpaper to specified image under antiX Linux.
      # IMPORTANT: The image filename must not contain spaces.
      imagefile="$1"
      sed -i 's|^'$DESKTOP_SESSION_CODE'=.*$|'$DESKTOP_SESSION_CODE'='$imagefile'|' ~/.desktop-session/wallpaper-list.conf
      desktop-session-wallpaper $DESKTOP_SESSION_CODE

      Current workspace number can be obtained by xprop -root _NET_CURRENT_DESKTOP plus one. So we can assign to the workspace change event
      . ~/change-wallpaper.sh ~/wallpaper/$(($(xprop -root _NET_CURRENT_DESKTOP | tr -d ' ' | cut -d= -f2)+1)).jpg
      And put 1.jpg 2.jpg 3.jpg 4.jpg in, say, ~/wallpaper/

      For instance, for Fluxbox in ~/.fluxbox/keys by
      ChangeWorkspace :Exec . ~/change-wallpaper.sh ~/wallpaper/$(($(xprop -root _NET_CURRENT_DESKTOP | tr -d ' ' | cut -d= -f2)+1)).jpg

      But… the conky…

      It refreshes itself at the next tick only one second later after the workspace has been changed. It can be restarted by sending it the SIGHUP or SEGUSR1, but it is inappropriate. What we still miss in conky is the ability to send SIGUSER2 to run the next tick immediately.

      With that we remain.

      • This topic was modified 6 months ago by zblsv.
      • This topic was modified 6 months ago by zblsv.

      Words are carried away by the wind...

      #104703
      Member
      goobric
        Helpful
        Up
        0
        ::

        hi I am new to antiX, and resently installed ver 22 (previous ubuntu) can you please explain in simple terms how I have different wallpaper image on different workspaces? When I set the wallpaper on workspace 1 this automatically populates to workspace 2 & 3!
        I can accommplish this in other linux distros, but am unable to find a way to complete this in antiX22?

        Thank you so much for your assistance.

        #104712
        Forum Admin
        anticapitalista
          Helpful
          Up
          0
          ::

          There is no simple way to do this on antiX.

          Philosophers have interpreted the world in many ways; the point is to change it.

          antiX with runit - leaner and meaner.

          #104715
          Member
          zblsv
            Helpful
            Up
            0
            ::

            This theme is valuable for me too. I also want to have different wallpapers on different workspaces. But, I am sorry, goobric. Right now I definitely have no free time to spend to this. I must do the home care that I having defer for years. Therefore only some thoughts.

            On antiX (19.3 at least, as I know) desktop-session-wallpaper script intentionally sets only one wallpaper for all the workspaces for the sake to it can be random. Therefore we can disable desktop-session-wallpaper somehow. And than use window manager capabilities to set wallpaper. This is not a trivial task for newbies, I think.

            Words are carried away by the wind...

            #104720
            Member
            goobric
              Helpful
              Up
              0
              ::

              thank you so much for your quick response zblsv, and your advice; much appreciated 🙂
              I hope that the maintainers antiX and those that have much better programming understanding and knowledge than I, are able to implement this functionality.

              #104721
              Forum Admin
              anticapitalista
                Helpful
                Up
                0
                ::

                thank you so much for your quick response zblsv, and your advice; much appreciated 🙂
                I hope that the maintainers antiX and those that have much better programming understanding and knowledge than I, are able to implement this functionality.

                It is very low priority.

                Philosophers have interpreted the world in many ways; the point is to change it.

                antiX with runit - leaner and meaner.

                #104724
                Moderator
                Brian Masinick
                  Helpful
                  Up
                  0
                  ::

                  thank you so much for your quick response zblsv, and your advice; much appreciated 🙂
                  I hope that the maintainers antiX and those that have much better programming understanding and knowledge than I, are able to implement this functionality.

                  Perhaps this is an opportunity to learn and if you figure out a solution share it; that’s how freely available software works.

                  Alternatively convince someone to build something based on detailed ideas; once in a while that works out, though contributing is the usual approach that works.

                  --
                  Brian Masinick

                  #104725
                  Member
                  zblsv
                    Helpful
                    Up
                    1
                    ::

                    Perhaps this is an opportunity to learn and if you figure out a solution share it; that’s how freely available software works.

                    Exactly. The open source philosophy is different from the commercial one. If we need functionality, then we shouldn’t try to wait for someone else to do it for us. We have to do it ourselves. If we don’t know how to program, then we have to learn to program to some extent to meet these needs. It’s worth it.

                    Words are carried away by the wind...

                    #104749
                    Member
                    blur13
                      Helpful
                      Up
                      0
                      ::

                      If you only use icewm you can map the key for switching workspace to
                      wmctrl -s <workspace_name> && feh --no-fehbg --bg-fill /path/to/picture.jpg

                      so for instance, if workspaces are named 1, 2, 3, 4
                      in .icewm/keys

                      key Alt+1 /bin/sh -c "wmctrl -s 1 && feh --no-fehbg --bg-fill /path/to/picture.jpg"
                      key Alt+2 /bin/sh -c "wmctrl -s 2 && feh --no-fehbg --bg-fill /path/to/picture.jpg"

                      I havent tried this, I’m basically just thinking out loud. And this is probably along the lines of what OP was doing in the first place, so its not very innovative either.

                      • This reply was modified 2 weeks, 4 days ago by blur13.
                      #104751
                      Moderator
                      Brian Masinick
                        Helpful
                        Up
                        0
                        ::

                        Perhaps this is an opportunity to learn and if you figure out a solution share it; that’s how freely available software works.

                        Exactly. The open source philosophy is different from the commercial one. If we need functionality, then we shouldn’t try to wait for someone else to do it for us. We have to do it ourselves. If we don’t know how to program, then we have to learn to program to some extent to meet these needs. It’s worth it.

                        Thank you. Anticapitalista is not being mean. He volunteers a great deal of his own time and energy for this project. If he makes any income from this work at all, it’s an indirect benefit. I’m paid zero. What I gain is excellent free software with which I can use, hack, share and use old equipment. I’ve directly either given computers with antiX on them or customized a solution for at least three people directly and I do my best every year to help as many people as I can with free software and it’s usually antiX.

                        --
                        Brian Masinick

                        #104759
                        Moderator
                        Brian Masinick
                          Helpful
                          Up
                          0
                          ::

                          If you only use icewm you can map the key for switching workspace to
                          wmctrl -s <workspace_name> && feh --no-fehbg --bg-fill /path/to/picture.jpg

                          so for instance, if workspaces are named 1, 2, 3, 4
                          in .icewm/keys

                          key Alt+1 /bin/sh -c "wmctrl -s 1 && feh --no-fehbg --bg-fill /path/to/picture.jpg"
                          key Alt+2 /bin/sh -c "wmctrl -s 2 && feh --no-fehbg --bg-fill /path/to/picture.jpg"

                          I havent tried this, I’m basically just thinking out loud. And this is probably along the lines of what OP was doing in the first place, so its not very innovative either.

                          I haven’t tried your idea yet @blur13 but I think you’re on the right track.
                          Even if that isn’t the final solution, at worst, whenever you change workspace, you could have some kind of script that you run
                          instead of simply clicking on the other workspace, and in effect, what it’d do is change the workspace and the background.
                          I don’t know if there is a way to make each workspace concurrently have a different wallpaper, but it’s definitely
                          possible to change the workspace and the background via a script; if all else fails, that is a workaround solution.

                          --
                          Brian Masinick

                          #104765
                          Moderator
                          Brian Masinick
                            Helpful
                            Up
                            0
                            ::

                            One minor change to the procedure, @blur13 and then it ought to work:

                            key Alt+1 /bin/sh -c “wmctrl -s 0 && feh –no-fehbg –bg-fill /home/masinick/Pictures/antiX-image.jpg”
                            key Alt+2 /bin/sh -c “wmctrl -s 1 && feh –no-fehbg –bg-fill /home/masinick/Pictures/Cumberland_Falls.jpg”
                            key Alt+3 /bin/sh -c “wmctrl -s 2 && feh –no-fehbg –bg-fill /home/masinick/Pictures/Cumberland_Falls_Moonbow_panarama.jpg”
                            key Alt+4 /bin/sh -c “wmctrl -s 3 && feh –no-fehbg –bg-fill /home/masinick/Pictures/antiX-image.jpg”

                            Notice that Workspace 1 gets key Alt 1 but the wmctrl -s is 0; as far as the workspace backgrounds, they can change.

                            I did this, and using Alt+1 through Alt+4 did change the wallpaper; however if you use another means to switch workspaces, such as clicking on the task bar workspaces, it does NOT change the workspace, so the solution I show above works, assuming you replace my images with yours.

                            Nice workable alternative!

                            --
                            Brian Masinick

                            #104766
                            Moderator
                            Brian Masinick
                              Helpful
                              Up
                              0
                              ::

                              By the way, I DO rename my workspaces; mine are named Web, Mail, Term, and Edit, but for the procedure to work, you have to pass 0, 1, 2, or 3 if you have four workspaces to the wmctrrl -s command.

                              So if you use the IceWM toolbar and click on your different workspaces, it won’t change the wallpaper, but if you code similar to what I did above, adding the alt key combinations, and the backgrounds for each, it’ll work, but it’s actually changing all the workspaces; still, as long as you use the alt key combos, you won’t notice…

                              --
                              Brian Masinick

                              #104772
                              Member
                              blur13
                                Helpful
                                Up
                                0
                                ::

                                Nice work Brian!

                                I checked the man pages for wmctrl and of course you are right about the numbering and also that the “name” given doesnt matter:

                                -s <DESK> Switch to the desktop <DESK>.

                                <DESK> A Desktop is always specified by an integer which represents the desktop numbers. Desktop numbers start at 0.

                                #104773
                                Moderator
                                Brian Masinick
                                  Helpful
                                  Up
                                  0
                                  ::

                                  Glad it worked out,

                                  I just tried your method and made minor adjustments so I guess it took both of us cooperating to get it done right 👍

                                  --
                                  Brian Masinick

                                Viewing 15 posts - 1 through 15 (of 15 total)
                                • You must be logged in to reply to this topic.