Tip for Fluxbox users: have a different wallpaper for each workspace

Forum Forums General Software Tip for Fluxbox users: have a different wallpaper for each workspace

  • This topic has 7 replies, 4 voices, and was last updated Sep 30-7:54 pm by Anonymous.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #42327
    Member
    PPC

      Hi!
      I’ve been colaborating with Jerry, a MX-Fluxbox dev on a nice little script, that was made with MXFB in mind but works great with antiX Fluxbox: run the script, use the gui to select individual wallpapers for each workspace, and you’r set!

      Script available over at https://github.com/jerry3904/mxfb-goodies It’s the “mxfb-separate-backgrounds” one.

      Funny enough, I use the default icewm desktop on both my antiX computers… but I though Fluxbox users would like this little eye candy that does not use any extra system resources!

      P.

      • This topic was modified 2 years, 7 months ago by PPC.
      #42329
      Member
      Xecure
        Helpful
        Up
        0
        ::

        I think this could also work on antiX with SpaceFM as desktop icon manager. You simply have to leave the Wallpaper option in the SpaceFM Desktop preferences deactivated and use this instead for managing the background, I think. I will test it out when I have the time on the weekend.

        Nice addition.

        antiX Live system enthusiast.
        General Live Boot Parameters for antiX.

        #42335
        Forum Admin
        Dave
          Helpful
          Up
          0
          ::

          Here is what I had from a while back for Rox desktops from last time someone had asked…

          
          #!/bin/bash
          workspace=$(xprop -root _NET_CURRENT_DESKTOP| cut -d "=" -f2 |cut -d " " -f2);
          wallpaper="/home/User1/Wallpaper/$workspace.jpg";
          Rox-Wallpaper "$wallpaper" &
          feh  --bg-scale "$wallpaper" &
          

          Without looking I am sure the script that you collaborated with Jerry on is much better suited for the task.

          The below is just information that may be of interest as far as integrating with antiX default setup…
          desktop-session-wallpaper is what handles the wallpaper setting for each desktop in antiX. It reads from two configuration files (~/.desktop-session/wallpaper.conf and ~/.desktop-session/wallpaper-list.conf). These files are generally set by wallpaper(.py) though they can be set by manual editing as well. The first configuration is the style/option/function settings, the second is where the wallpapers are stored based on session name. Currently it does not possess manual overrides via command line options. This could be adjusted for use in your script.

          Alternatively another TYPE= option could be added easily to the wallpaper.conf options (TYPE=workspace) which could use the
          workspace=$(xprop -root _NET_CURRENT_DESKTOP| cut -d "=" -f2 |cut -d " " -f2);
          line to get the workspace number and set that named wallpaper (1.jpg, 2.jpg, 3.jpg, etc) as needed for the various sessions. This can be done by adding a section to the type case statement in desktop-session-wallpaper that would use the workspace retrieval line, then sed to write the new wallpaper name (1.jpg) to the wallpaper-list.conf file, then call the wallpaper_set function.

          A bonus would be to have the wallpapers saved in and read from ~/.desktop-session/wallpaper-list.conf as

          rox-icewm1=......my-fancy-wallpaper.jpg
          rox-icewm2=.......latest-work-joke.png
          rox-icewm3=.......planned-vacation-location.jpeg
          

          This would require modifying the wallpaper_set function. In particular the wallpaper=blahblahblah line to acknowledge the possibility of an appended number (presence of $1) to the (desktop-session) code.

          I can add it in as above if it is wanted while doing the python/gtk 3 updating/rewrites. It does not have to wait for me though if you wanted to give it a go; adding your improvements.

          Making the gui (wallpaper(.py)) reflect this option would be a fair amount more difficult. Does it work for more than fluxbox??? Probably other concerning points as well. Thus this is liable to remain a “hidden” option within manually editing the configuration file.

          Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown

          #42336
          Anonymous
            Helpful
            Up
            0
            ::

            xprop -root _NET_CURRENT_DESKTOP| cut -d "=" -f2 |cut -d " " -f2

            Alternatively, these short commandstrings each return an integer value:
            xdotool get_desktop
            xdotool get_num_desktops

            #42337
            Anonymous
              Helpful
              Up
              0
              ::

              fluxbox-remote restart

              As a somewhat esoteric consideration, I would recommend, instead:
              fluxbox-remote reconfigure

              Reasons:
              1) We have witnessed “jam ups” when certain items (conky), due to their inclusion in the session startup file, are relaunched. Some apps ignore whether a running instance of itself already exists and will happily launch redundant (and perhaps competing) instances of itself.

              2) as noted in the fluxbox-remote manpage…

              CAVEATS
              fluxbox-remote(1) uses the X11 protocol to communicate with fluxbox(1). Therefore, it is possible
              for any user with access to the X(7) server to use fluxbox-remote(1). For this reason, several key
              commands have been disabled. Users should be aware of the security implications when enabling
              fluxbox-remote(1), especially when using a forwarded X(7) connection.

              …and some custom fluxbox builds do patch fluxbox-remote.cc to explicitly discard/ignore the restart command.

              #42345
              Forum Admin
              Dave
                Helpful
                Up
                0
                ::

                xprop -root _NET_CURRENT_DESKTOP| cut -d "=" -f2 |cut -d " " -f2

                Alternatively, these short commandstrings each return an integer value:
                xdotool get_desktop
                xdotool get_num_desktops

                IIRC correctly xprop is part of the standard x11-utils package.
                xdotool is indeed quite powerfull. Is it now installed by default?

                Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown

                #42388
                Anonymous
                  Helpful
                  Up
                  0
                  ::

                  Aw, I had forgotten xdotools is not part of the x11-utils pkg. So, yeah, xprop would be the safer choice.

                  > Is it now installed by default?

                  Because you asked and piqued my curiosity, I checked just now.
                  Yes, xdotool is preinstalled in antiX 19 Full and Base editions

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