Closed kRHYME7 closed 1 month ago
I tried a moment to use a transparent background image, but it looks like the desktop window itself isn't transparent. Hyprland allows layer-rules but it doesn't look as you can set transparency https://wiki.hyprland.org/Configuring/Window-Rules/#layer-rules and it would make the icons transparent too.
@tsujan will know more about possibilities to allow another wallpaper engine. What are you missing here?
This is the only icon desktop manager project I know that uses Wayland's layer shell. And everything works perfectly as implemented.
Not only the desktop manager :) https://github.com/lxqt/lxqt-wayland-session/
Is there a way to make the wallpaper fully transparent?
Use a transparent image.
pcmanfm-qt just draws an image or a color as the background of its desktop widget. What is "behind" that widget isn't controlled by pcmanfm-qt.
I see, so basically If I load a fully transparent png file it should give me a transparent background of the widget right? Thanks!
As I said above, that doesn't work here.
so basically If I load a fully transparent png file it should give me a transparent background of the widget right?
Yes. Use the mode "Stretch to fill the entire screen".
pcmanfm-qt's desktop is a special widget. A widget is like a rectangular object containing some other objects (like desktop items, in this case). With a transparent background, a widget shows its contents and what is "behind" them.
As I said above, that doesn't work here.
Could you be more specific about what is supposed to work?
Since this is about Wayland, let be more specific
pcmanfm-qt puts its desktop widget on the background layer.
A Wayland wallpaper engine usually puts its image on the background layer too.
Now, theoretically, two things can happen:
I'm curious why --desktop is in 'Background' Layer not 'Bottom' . But I guess because of its built in desktop wallpaper?
Both are on the background layer, but transparency can't be achieved to see the wallpaper (here done with swaybg
). Probably due to the the namespace swaybg is always below the desktop, on every compositor,
Layer level 0 (background):
Layer 5d20d4979cf0: xywh: 0 0 1920 1080, namespace: wallpaper
Layer 5d20d522b950: xywh: 0 0 1920 1080, namespace: desktop
Layer level 1 (bottom):
Layer 5d20d4979cf0: xywh: 0 0 1920 1080, namespace: wallpaper Layer 5d20d522b950: xywh: 0 0 1920 1080, namespace: desktop
@stefonarch This one I think is expected as explained here https://github.com/lxqt/pcmanfm-qt/issues/1949?notification_referrer_id=NT_kwDOAy8V47QxMjc0MjMxMDc0Mzo1MzQxNzQ0Mw#issuecomment-2397445309
@tsujan For now, I'm not successful. Looks Like it tries to resolve the transparent image by rendering the Qt color. Also as observed with the images below, waybar and the Qt shell shows an expected behavior. So I can't say that this is a Compositor thing.
Note That I set the opacity of this layer to 0.
And here's the full command for pcmanfm-qt
pcmanfm-qt --set-wallpaper ~/Pictures/Wallpapers/Transparent.png --wallpaper-mode stretch --desktop
Sorry, I thought that I had a good memory of the code, but after taking a look at it, I got disillusioned: There seem to be two reasons for the background not being transparent in spite of a transparent wallpaper.
Will work on it soon. Reopening for now...
I tried a moment to use a transparent background image, but it looks like the desktop window itself isn't transparent. Hyprland allows layer-rules but it doesn't look as you can set transparency https://wiki.hyprland.org/Configuring/Window-Rules/#layer-rules and it would make the icons transparent too.
@tsujan will know more about possibilities to allow another wallpaper engine. What are you missing here?
Only now I realize what you meant by this. Yeah @stefonarch
OK, I mistakenly assumed that a desktop with a transparent wallpaper should always be transparent itself because I use the Kvantum widget style. With Kvantum, the desktop will actually be transparent if three conditions are fulfilled: (1) the wallpaper is transparent; (2) the wallpaper is stretched to fill the screen; and (3) the active Kvantum theme makes windows transparent.
To make the same thing happen with all Qt styles (e.g. Fusion), I modified the code and explicitly made the desktop window transparent on Wayland. A few other modifications were needed to make the code work with all wallpaper modes.
Since the modifications are small and limited to Wayland, and also because compositing always exist under Wayland, I'll make a PR tomorrow.
Apart from this, a general idea came to my mind. Under X11, we had to worry about the existence of compositing and restrict our codes accordingly, while there is no need to such restrictions under Wayland. Perhaps there are other parts of LXQt, where we could remove this restriction on Wayland by adding a few lines of code — Translucency of Fancy Menu comes to mind...
Translucency of Fancy Menu comes to mind...
For some reason it's already transparent on Hyprland with Valendas or Dark theme:
Another funny thing is that by default all panels are transparent on every compositor, to have an opaque panel you need to set a background color.
@stefonarch
I guess the compositor detects an alpha value and tries to ignore it effectively hav transparent + blur = translucent ? Are the images above something kind of rendered as layer shell?
Are the images above something kind of rendered as layer shell?
Yes, panels and runner and notifications are on layers, exit dialog too.
The PR is here: https://github.com/lxqt/pcmanfm-qt/pull/1950
You could test it with any wallpaper mode and any trasnparent wallpaper, like a simple SVG image transparent.svg
with the following contents:
<svg width="48" version="1.1" xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 0 48 48"/>
I only have a low power laptop, so it takes time to build. Will get back to you after this.
BTW, is it expected that the --desktop is only rendered on the first monitor it sees?
I only have a low power laptop, so it takes time to build.
You first need to compile and install git libfm-qt -- unless you already use git LXQt packages.
BTW, is it expected that the --desktop is only rendered on the first monitor it sees?
No. Such problems are already fixed in git pcmanfm-qt.
EDIT: You could also wait for LXQt 2.1.0, which will be released in November.
Cool! I'll build the -git package first. Then from there I try to change the PKGBUILD to switch branch pointing to the PR.
Also, I guess we can make a request for lxqt packages here ? https://github.com/chaotic-aur/packages
edit: woah 🫶
Thanks for testing! It seems that the rendering problem is also fixed for you with the git pcmanfm-qt.
In your screenshot I saw that you used killall
to stop pcmanfm-qt's process. The correct and clean command is pcmanfm-qt --quit
.
@tsujan PR works as expected and I also just use the Transparent png file.
For now, I will just try to script my way, by modifying the margins to dodge waybar. Waybar and desktop have different Z levels, so margins should help.
I might open another Issue, but let me ask here first.
BTW, is there any mechanism I can try to replicate in the CLI the Apply
button? Quitting the process will be my option, but is there another way to seamlessly update the instance when the config is changed?
In your screenshot I saw that you used killall to stop pcmanfm-qt's process. The correct and clean command is pcmanfm-qt --quit.
Uy, thanks!
... is there another way to seamlessly update the instance when the config is changed?
If you mean updating the GUI of pacmanfm-qt on changing its config file(s) manually, the answer is no. This feature may be good for apps like terminal emulators but not for all apps.
More importantly and for various reasons, pcmanfm-qt reads its settings only when it's started and saves changes only on quitting. This means that a manual editing of its config file will be useless if it's running: to change settings manually (not recommended), the user needs to stop pcmanfm-qt's process first.
Should be added to the Wiki IMO.
Waybar and desktop have different Z levels, so margins should help.
Sorry, I didn't see this. Yes, margins are needed with any panel under Wayland — read the last paragraph of the Wiki section about Wayland.
Is your feature request related to a problem? Please describe.
In Hyprland, I want to still use another wallpaper engine. Or I just want the desktop icon management of pcmanfm-qt.
Describe the solution you'd like
Is there a way to make the wallpaper fully transparent?
Describe eventual alternatives you've considered
Having alpha to 0 can make wallpaper transparent.
Context
I'm using hyprland and stumbled upon this project. To be fair, hyprland is not specifically built for this, but someone might find this useful (me).