You are not logged in.

#101 2025-01-01 19:51:20

micko01
void main()
From: Queensland, Australia
Registered: 2024-04-07
Posts: 492
Website

Re: Wallpaper setter for Carbon - X11 and Wayland

I updated to labwc-0.8.2 and a bug is exposed. We get a splash saying "labwc:wlroots is unsupported"

The interim fix until I push a new version is this:

sed -i 's/labwc/labwc*/' path/to/xwwall

This will affect you @johnraff


#!/bin/sh
echo '#include <stdio.h>\nvoid main() { printf("Hi, bunsenlabs\\n"); return; }' > bunsen.c
gcc bunsen.c -o bunsen
./bunsen

Offline

#102 2025-01-02 03:27:57

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,550
Website

Re: Wallpaper setter for Carbon - X11 and Wayland

^Thanks.

For those watching at home, labwc has changed how it reports XDG_CURRENT_DESKTOP from "wlroots" to "labwc:wlroots".
https://github.com/labwc/labwc/pull/1716

I noticed also that the maximize icon in window titlebars no longer changes when the window is maximized. Will have a look if anyone has reported this...


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#103 2025-01-02 04:25:55

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,550
Website

Re: Wallpaper setter for Carbon - X11 and Wayland

On reflection @micko01 maybe that XDG_CURRENT_DESKTOP test could be revisited?

That envvar can easily be set by any distro to anything they like.
I guess you're trying to avoid a clash with DE's like GNOME or XFCE that have their own mechanisms for setting wallpaper?
(That would apply equally under Xorg as Wayland of course.)

Might it be easier to go in the opposite direction and look for DE's that are known to have wallpaper setters, and allow anything else?

Or replace the error out with a warning message and carry on?


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#104 2025-01-06 09:24:42

micko01
void main()
From: Queensland, Australia
Registered: 2024-04-07
Posts: 492
Website

Re: Wallpaper setter for Carbon - X11 and Wayland

micko01 wrote:

I updated to labwc-0.8.2 and a bug is exposed. We get a splash saying "labwc:wlroots is unsupported"

The interim fix until I push a new version is this:

sed -i 's/labwc/labwc*/' path/to/xwwall

This will affect you @johnraff

<ot>

@johnraff - you may (or may not?) be prompted to upgrade labwc on your next update to the VM.

See this github comment (and read on) for context.

</ot>


#!/bin/sh
echo '#include <stdio.h>\nvoid main() { printf("Hi, bunsenlabs\\n"); return; }' > bunsen.c
gcc bunsen.c -o bunsen
./bunsen

Offline

#105 2025-01-07 05:24:39

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,550
Website

Re: Wallpaper setter for Carbon - X11 and Wayland

There it is:

labwc/unknown 0.8.2-2.1+bl1 amd64 [upgradable from: 0.8.2-1]

Now upgraded - where to see the new titlebar window icons?

---
Right now I'm wrangling with qemu, virt-manager and remote-viewer, trying to enable a second display so I can test xwwall with multiple displays. Right now second window hangs at "Waiting for display 2..." (sometimes just blank). @micko does that ring any bells for you?

Last edited by johnraff (2025-01-07 08:03:16)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#106 2025-01-07 10:34:01

micko01
void main()
From: Queensland, Australia
Registered: 2024-04-07
Posts: 492
Website

Re: Wallpaper setter for Carbon - X11 and Wayland

johnraff wrote:

There it is:

labwc/unknown 0.8.2-2.1+bl1 amd64 [upgradable from: 0.8.2-1]

Now upgraded - where to see the new titlebar window icons?


You need a snippet in rc.xml in the '<theme>' section.

<icon>labbe-material-bark</icon>

Here's my entire theme section

  <theme>
    <name>bunsen-yaru-bark-dark</name>
    <icon>labbe-material-bark</icon>
    <cornerRadius>10</cornerRadius>
    <titlebar>
      <layout>icon:iconify,max,close</layout>
      <showTitle>yes</showTitle>
    </titlebar>
    <font>
      <name>SN Pro</name>
      <size>10</size>
      <slant>normal</slant>
      <weight>normal</weight>
    </font>
    <font place="MenuItem">
      <name>SN Pro</name>
      <size>10</size>
      <slant>normal</slant>
      <weight>normal</weight>
    </font>
    <dropShadows>yes</dropShadows>
  </theme>

#!/bin/sh
echo '#include <stdio.h>\nvoid main() { printf("Hi, bunsenlabs\\n"); return; }' > bunsen.c
gcc bunsen.c -o bunsen
./bunsen

Offline

#107 2025-01-08 05:29:02

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,550
Website

Re: Wallpaper setter for Carbon - X11 and Wayland

^yup that did it. smile


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#108 2025-01-09 08:02:08

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,550
Website

Re: Wallpaper setter for Carbon - X11 and Wayland

johnraff wrote:

Right now I'm wrangling with qemu, virt-manager and remote-viewer, trying to enable a second display so I can test xwwall with multiple displays.

Finally got it. After enabling Display 2 in virt-viewer (or remote-viewer) you have to set it up in xrandr too. For future reference:

xrandr --output Virtual-2 --mode 1024x768 --right-of Virtual-1

The GUI arandr wasn't able to do it right. However once it was going OK, I used arandr to generate and save a script to reinvoke the setup on subsequent logins, which did work. It contained:

#!/bin/sh
xrandr --output Virtual-1 --primary --mode 1024x768 --pos 0x0 --rotate normal --output Virtual-2 --mode 1024x768 --pos 1024x0 --rotate normal --output Virtual-3 --off --output Virtual-4 --off

...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#109 2025-01-09 08:47:15

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,550
Website

Re: Wallpaper setter for Carbon - X11 and Wayland

johnraff wrote:

I noticed also that the maximize icon in window titlebars no longer changes when the window is maximized. Will have a look if anyone has reported this...

Forget that - it's the openbox theme and it's always been like that.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#110 2025-01-09 09:15:19

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,550
Website

Re: Wallpaper setter for Carbon - X11 and Wayland

johnraff wrote:
johnraff wrote:

...trying to enable a second display so I can test xwwall with multiple displays.

Finally got it.

So, now that there are two displays available, I could go on to test xwwall's multi-display wallpaper setting.

The good news - it works perfectly. smile

The bad news - there is a GUI issue I think. When you click a wallpaper image in the main window to use, the dialog that pops up has a "Mode" selection - cool, you can choose stretch or whatever. Then is an "Output" box which looks very similar, but it seems to be stuck on Output 1 (Virtual-1 in this case). Click the image anyway, and the next image you choose will be applied to Output 2.

So it works, but I think it's confusing for users. (It was for me anyway.) The output box looks like a selection but it's a label. Also, it's impossible to change the wallpaper for Output 2 without first doing Output 1. I can see that it might be complicated to change that, so maybe a brushing up of the titles and messaging would be enough for users to get that they have to set images for Output 1 and then Output 2?


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#111 2025-01-09 09:41:35

micko01
void main()
From: Queensland, Australia
Registered: 2024-04-07
Posts: 492
Website

Re: Wallpaper setter for Carbon - X11 and Wayland

johnraff wrote:

So it works, but I think it's confusing for users. (It was for me anyway.) The output box looks like a selection but it's a label.

It's actually a gtk-entry - I should set it to non-editable.

See if this patch helps for usability, at least it won't look similar to the 'Mode' box! (patch obsolete now of course)

--- /usr/bin/xwwall	2025-01-02 21:03:57.000000000 +1000
+++ bin/xwwall	2025-01-09 19:36:13.677648051 +1000
@@ -122,6 +122,9 @@
 #sep {
 	background: rgba(0,0,0,0.0);
 }
+#ent {
+	background: @theme_selected_bg_color;
+}
 ' > "$TEMP/win.css"
 
 
@@ -365,7 +368,7 @@
     </hbox>
 	 <hbox space-expand="true" space-fill="false">
       <text use-markup="true"><label>"<big>Output:</big>"</label></text>
-      <entry>
+      <entry name="ent" editable="false">
         <variable>OUT</variable>
         '$DEFAULT'
       </entry>

The main difference is the CSS uses the selected color of the themefor the entry widget, and the 'editable="false"' is really a bugfix, because the program would likely crash or do other weird stuff if the variable obtained was acted upon.

Last edited by micko01 (2025-01-11 04:28:23)


#!/bin/sh
echo '#include <stdio.h>\nvoid main() { printf("Hi, bunsenlabs\\n"); return; }' > bunsen.c
gcc bunsen.c -o bunsen
./bunsen

Offline

#112 2025-01-10 04:51:45

micko01
void main()
From: Queensland, Australia
Registered: 2024-04-07
Posts: 492
Website

Re: Wallpaper setter for Carbon - X11 and Wayland

As it turns out feh is very restricted in what it can do.

  • whatever mode you pick, the last one always sticks. Ideally you'd have your favourite wallpapers scaled/cropped to your monitor(s) resolution.

  • when using a transparent png/svg, if it's not centered or maxxed (that option will be added) on the first monitor, and the second wallpaper isn't centered/maxxed then we get a black (no wall at all) background on the first screen.

  • no option to set a solid color only, I can probably work around by making a tiny transparent SVG and using that. (this goes for wayland too).

Expect some improvements soon.


#!/bin/sh
echo '#include <stdio.h>\nvoid main() { printf("Hi, bunsenlabs\\n"); return; }' > bunsen.c
gcc bunsen.c -o bunsen
./bunsen

Offline

#113 2025-01-10 08:28:31

micko01
void main()
From: Queensland, Australia
Registered: 2024-04-07
Posts: 492
Website

Re: Wallpaper setter for Carbon - X11 and Wayland

Latest version *should* address the above concerns and hopefully not introduce regressions!

Direct link -> https://github.com/01micko/xwwall/blob/main/bin/xwwall

Man page also updated.


#!/bin/sh
echo '#include <stdio.h>\nvoid main() { printf("Hi, bunsenlabs\\n"); return; }' > bunsen.c
gcc bunsen.c -o bunsen
./bunsen

Offline

#114 2025-01-11 04:27:19

micko01
void main()
From: Queensland, Australia
Registered: 2024-04-07
Posts: 492
Website

Re: Wallpaper setter for Carbon - X11 and Wayland

Interesting that I need xwwall in xfce wayland session on debian. Not so on slackware as Patrick upgrades packages in -current almost daily. I'd hate to see his RSS feed!

See https://forums.bunsenlabs.org/viewtopic … 29#p140529 for scrot (uses grim).


#!/bin/sh
echo '#include <stdio.h>\nvoid main() { printf("Hi, bunsenlabs\\n"); return; }' > bunsen.c
gcc bunsen.c -o bunsen
./bunsen

Offline

#115 2025-01-11 06:26:17

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,550
Website

Re: Wallpaper setter for Carbon - X11 and Wayland

If you use xfdesktop4 in xfce, that will handle setting wallpapers. Also puts icons on the desktop, which not everyone wants of course.

I've been adding it to my BL setups for years because I like to use my desktop as a place to throw random documents till I get round to dealing with them - just like my IRL desktop.

But running xfdesktop has made testing xwwall on my real machine more complicated, and why it's mostly been on a VM.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#116 2025-01-12 02:43:11

micko01
void main()
From: Queensland, Australia
Registered: 2024-04-07
Posts: 492
Website

Re: Wallpaper setter for Carbon - X11 and Wayland

New version - 0.1.2, from here

New feature - profiles

From the man page

Advanced Startup
----------------
**xwwall** supports *profiles* such that you can have separate profile
directories under the ``$HOME/.config/xwwall/`` directory. This is
useful if you have different graphical environments setup so that you
can have different wallpapers in different sessions. For example, you
may have ``labwc`` and ``openbox`` on your system. You can create
separate profiles for each of these, and as many as you want, named
whatever you want. ``$HOME/.config/xwwall/labwc/`` profile directory
for *labwc* and ``$HOME/.config/xwwall/openbox/`` profile directory
for *openbox*.

Since *labwc* is a *wayland* compositor then to make the profile useful
you copy the ``$HOME/.config/xwwall/cmd`` file to
``$HOME/.config/xwwall/labwc/cmd``

And since *openbox* is an *X11* window manager the approach is slightly
different. You need to copy the ``$HOME/.fehbg`` executable file to
``$HOME/.config/xwwall/openbox/.fehbg``, making sure to preserve the
executable permissions on the copied file.

Similar procedures can be followed for respective *wayland* compositors
and *X11* window managers.

Once you have created your profile it then needs to be included in your
startup routine. You can simply append the name of the profile directory
to the ``--restore`` option in your startup routine like so:

``xwwall --restore openbox``

or whatever desired profile directory name you have used.

This feature is quite handy and intentionally is not part of the GUI, It's a bone to pick for advanced users, no need to be too advanced smile

I had a specific use case for it since I'm testing in openbox, labwc, xfce (wayland) and sway.

I changed the test for wayland from [[ -n "$WAYLAND_DISPLAY" ]] to [[ "$XDG_SESSION_TYPE" == 'wayland' ]].


#!/bin/sh
echo '#include <stdio.h>\nvoid main() { printf("Hi, bunsenlabs\\n"); return; }' > bunsen.c
gcc bunsen.c -o bunsen
./bunsen

Offline

#117 2025-01-12 05:18:56

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,550
Website

Re: Wallpaper setter for Carbon - X11 and Wayland

micko01 wrote:

New version - 0.1.2, from here

New feature - profiles

Cool!

I changed the test for wayland from [[ -n "$WAYLAND_DISPLAY" ]] to [[ "$XDG_SESSION_TYPE" == 'wayland' ]].

That might not be as reliable as testing $WAYLAND_DISPLAY.
XDG_SESSION_TYPE is set by display managers, but often arbitarily set by users if advice on the net is anything to go by. Also, sessions not launched via a display manager will might set XDG_SESSION_TYPE  to tty. (eg while labwc sets it to Wayland, openbox sets it to tty.)

Another method that seems to correctly report Wayland even launched from a tty is:
loginctl show-session self -p Type
(That - if used - could set a flag so it needn't be run multiple times.)
EDIT Forget that, it reports tty on openbox if launched by 'startx' on a TTY.

It seems Wayland is correctly detected by all the above methods, but not X11.

EDIT GTK devs discussion on envvars and distinguishing X11 from Wayland: https://gitlab.gnome.org/GNOME/gtk/-/issues/1741

Last edited by johnraff (2025-01-13 09:00:08)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#118 2025-01-12 10:09:13

ceeslans
Member
Registered: 2015-09-30
Posts: 195

Re: Wallpaper setter for Carbon - X11 and Wayland

@micko01 : Would it be possible to source the images from multiple folders?

On my fluxbox setup, I've been running a script originally by @sleekmason, which uses feh to set the background. I've added a few features like multiple-folder sourcing, thumbnail sizes & ratio etc. Definitely not as nice as your xwwall - and most certainly not coping well with large image directories, but it's blazing fast and gets the job done.
Below you can find the 'feh-setbg' script and respective config file

Would be grateful if you could look into the  possibility to add a multiple-folders option to xwwall too.

1urUUSEf_t.jpg

#!/bin/bash

### original script by @sleekmason (Nov'21)
### reworked/extended/added options by @ceeslans (Nov'21) 

# DIR="$(cd "$(dirname "$0")" && pwd)"
# source $DIR/feh-setbg.conf
source $HOME/.config/feh-setbg.conf

THUMBH="$(echo "$THUMBW*$RATIO" | bc)"
WINW="$(echo "$THUMBW*$ROWMAX" | bc)"

feh $RECURS -t -P -N -q -J 300 -y $THUMBW -E $THUMBH -W $WINW \
--class "feh-setbg" --title "Wallpaper" --scale-down --index-info "$FNAME" \
--fontpath /usr/share/fonts/truetype/dejavu/ --font DejaVuSans.ttf/$FSIZE \
--action ";feh $BGMOD %F" $IMDIR1 $IMDIR2 $IMDIR3 $IMDIR4 $IMDIR5 $IMDIR6
### ====================================
### configuration for 'feh-setbg' script
### ====================================

### WALLPAPER FOLDER(S) - select image folder(s) to be sourced 
######### ----------------------------------------------------
#	IMDIR1=/usr/share/backgrounds
IMDIR2=$HOME/.fluxbox/backgrounds
IMDIR3=$HOME/Pictures/wallpaper
#	IMDIR4=$HOME/Downloads
#	IMDIR5=/mnt/DATA/Images/Wallpaper/Linux

### uncomment for recursive search
######### ------------------------
# 	RECURS="-r"

### SCREENSIZE RATIO
### ----------------
RATIO=0.55	    #for 16:9 screens  (eg: 1920x1080)
#	RATIO=0.61	    #for 16:10 screens (eg: 1920x1200)
#	RATIO=0.66	    #for 3:2 screens   (eg: 1920x1280)
#	RATIO=0.74	    #for 4:3 screens   (eg: 1920x1440)

### THUMBNAILS -  select thumbnail width 
#########-------------------------------
#	THUMBW=80		#tiny      (80x50)
#	THUMBW=96		#smaller   (96x60)
#	THUMBW=120		#small    (120x75)
#	THUMBW=144	    #standard (144x90)
THUMBW=160		#medium  (160x100)
#	THUMBW=200		#large   (200x125)
#	THUMBW=240		#huge	 (240x150)

### max number of thumbnails per row
######### --------------------------
#	ROWMAX=3
ROWMAX=4
#	ROWMAX=5
#	ROWMAX=6

### uncomment to show filenames below thumbs
######### ----------------------------------
FNAME=%n

### adjust fontsize
######### ---------
#	FSIZE=7
FSIZE=8
#	FSIZE=9

### WALLPAPER SETTINGS - select background setting mode
######### ---------------------------------------------
# BGMOD="--bg-scale"	### scaled
BGMOD="--bg-fill"		### filled
# BGMOD="--bg-max"		### centered	

### uncomment if selection should *NOT* be written to ~/.fehbg
######### ----------------------------------------------------
#	FEHBG="--no-fehbg"	

Last edited by ceeslans (2025-01-24 12:15:52)

Offline

#119 2025-01-13 11:26:32

micko01
void main()
From: Queensland, Australia
Registered: 2024-04-07
Posts: 492
Website

Re: Wallpaper setter for Carbon - X11 and Wayland

@ceeslans thanks for your input. and code.

Multiple background dirs is in scope, see https://forums.bunsenlabs.org/viewtopic … 77#p140077

I've already started the config side, but won't get time until the weekend to refine the backend.


#!/bin/sh
echo '#include <stdio.h>\nvoid main() { printf("Hi, bunsenlabs\\n"); return; }' > bunsen.c
gcc bunsen.c -o bunsen
./bunsen

Offline

#120 2025-01-13 11:34:21

micko01
void main()
From: Queensland, Australia
Registered: 2024-04-07
Posts: 492
Website

Re: Wallpaper setter for Carbon - X11 and Wayland

@johnraff I've decided to go with the simplest test of all.

I asked myself, "what is common with all X11 window managers?"  Answer.. Xorg.

So naturally a graphical user interface must be running for GTK to work, and AFAIK there are only 2 in linux (excluding legacy stuff like Xvesa) , X11 and Wayland, so testing pidof Xorg should be more than enough to differentiate graphical sessions. If there is anything else out there then it's not in scope for a simple application like this anyway.


#!/bin/sh
echo '#include <stdio.h>\nvoid main() { printf("Hi, bunsenlabs\\n"); return; }' > bunsen.c
gcc bunsen.c -o bunsen
./bunsen

Offline

Board footer

Powered by FluxBB