I3 Transparent Windows with Rounded Corners

New to i3 and want to have a visually appealing experience. Currently, I am trying to achieve two objectives, which seem to be practically related:

  1. Terminals in all VMs (assume xfce4-terminal) with transparent backgrounds

  2. All windows with rounded corners

What I currently have:

  • In “xfce4-terminal > Preferences > Appearance > Background” set to “Transparent Background” with Opacity set to 0.5

  • picom installed in dom0

  • In dom0, ~/.config/i3/config ends with:

    • exec_always “picom --no-fading-openclose --corner-radius 10”

What works

  • All windows have rounded corners (see exception below)

  • xfce4-terminal in dom0 is transparent

The problems (tl;dr)

  1. Terminals anywhere other than dom0 are not transparent (at opacity = 0 the terminals have a solid black background rather than showing the desktop)

  2. Browsers/terminals/windows of any kind that are not dom0 have rounded corners, but the part of the corner that is removed is black rather than transparent.

My conclusion is that, for the Qubes unified desktop to work, the OS first draws a black background for a new VM window and then draws the actual application overtop. Hence, rounding corners or making windows transparent would reveal a black background rather than the desktop as expected. But I’m no expert so I’m likely wrong

Is there a way to change this? Is it a Qubes/XFCE/VM/i3/Xen issue?

I’ve only managed to tweak i3 configurations (zeroing opacity on a variety of color settings, like using #00000000) to no avail.

1 Like

Have you downloaded the latest version or built picom from source?
I would suggest you take the sample configuration and try all the different options to see if it can fix your problem. Switching backends might also help. It could also be an issue with how Qubes handle the qubes windows too like you pointed out. I would still try out playing with picom settings just in case but if dom0 windows are not showing the same behavior then it could be coming from somewhere else.

2 Likes

@i3confuze

Do you mind sharing your i3 config and how you got picom in dom0.

I’m currently trying to implement the same thing.

1 Like

I installed using “sudo qubes-dom0-update picom

picom --version” gives me v10. Looking at their Github releases, I see that v11-rc1 includes a fix that removes black corners on xrender, which is the default backend.

That said, setting the “--backend glx” solved the black corner issue. However, extensive tweaks of the configuration file has yielded no changes in the terminal transparency.

Any ideas on what the graphics communication backend is for Qubes, especially for VM windows? I’m also interested in removing all window borders (except the top with the title), and removing borders with i3 config has proven fruitless. I think the backend is to blame for this AND the inability to make VM terminals transparent.

Thanks for the help!

1 Like

how you got picom in dom0

sudo qubes-dom0-update picom

sharing your i3 config

No, only because moving files out of dom0 is laborious. Also, it is very lengthy. The only relevant part is what I already mentioned in the OP:

  • In dom0, ~/.config/i3/config ends with:

    • exec_always “picom --no-fading-openclose --corner-radius 10"

As mentioned in my other comment, also add --backend glx to the picom command.

If you have more specific questions than “share your config file”, I would recommend making a separate post and I can answer there.

2 Likes

Got it. In my mind i imagined, just copying and pasting the text using the clipboard. But, I’ll take the recommendations and see if that works. Thanks.

1 Like

@i3confuze

I solved this issue.

change the last line to “exec_always picom”

then add a ~/.config/picom/picom.conf

You can change all of the settings there, as well as opacity rules.
Like DVM said check out his link to the sample config.

corner-radius = 10
backend = "glx"
2 Likes

The config file is certainly helpful. Glad you found it and that it was helpful for you.

If you figure out how to get transparency in VM (non-dom0) terminals, please let me know!

1 Like

An overview of the GUI implementation is described in the official docs here.

Once you get the overall idea, then see how all the stuff looks like from the point of view of a domain (from the inside): here’s a screenshot, which showcases it:

However, this screenshot showcases the point of view of an application inside a qube, rather than what happens in dom0. After reading the docs carefully on the communication between an AppVM and dom0, the conclusion is that the “final window drawn by dom0” is by dom0 to handle, hence the colorful borders with labels and other fancy stuff like making certain windows semi-transparent.

I believe the easiest way to witness this is to open the XFCE4 Window Manager Tweaks application and set the “Opacity of inactive windows” slider to some value lower than 100%.

2 Likes

At this point in troubleshooting, I have decided (for my personal implementation) to abandon the pursuit of transparent terminals. It is proving to be more effort than I am willing to put forth at present (or it is not possible on Qubes).

If someone figures this out at a later date, please comment below!

1 Like

Oh, I recall something else! Considering the idea:

Last year I raised this issue, which got fixed. Considering one comment, I suppose that certain terminals may try to do some fancy decorating themselves, only for it to be sanitized and rendered as pitch black box. I can still see this in Nautilus running in a Fedora 40 qube, but it’s not as blatant as in that issue. I’ll attach it, so I can showcase something else, what’s less distracting than that one ugly box from the issue:

While the black box on the folder being dragged is there alright (I suppose Nautilus tries to draw a nice-looking shadow here), please open this attachment in a new tab and see, that this screenshot, which was taken in dom0 with a mountainous photograph wallpaper (/usr/share/backgrounds/qubes/benjamin-voros-phIFdC6lA4E-unsplash.jpg to be precise) has no snippets of this wallpaper at the outside of the xfwm4 window border, but instead there’s plain white color, not even the window shadows I have enabled.

I suppose that certain tools may just act differently than expected, but also I can’t tell, why your specific configuration renders the way it renders. We can try and debug it, but I’d start with some details like the i3 and picom versions used - are they taken straight from the Qubes dom0 repository/Fedora 37 repository, or some custom compilation is taking place here? Does it behave the same way on Fedora 37 with its/your custom i3 and picom config? Asking, since it may be related to this point:

Browsers/terminals/windows of any kind that are not dom0 have rounded corners, but the part of the corner that is removed is black rather than transparent.

1 Like

I’ve been using picom in dom0 for more than a year with i3. Never had any problems getting transparency in appVM terminals or dom0 for that matter. I have an “exec_always” statement in my i3 config to run picom. I also have a separate picom.conf as another poster mentioned.

2 Likes

I have a more nuanced question.

Are you using the opacity setting to achieve transparency, or are you redrawing the background?

I’ve got the opacity setting to work just fine, as mentioned.

The one downside to opacity, is that it also reduced the opacity of the foreground text.

It’s a challenging question, but if anyone figures out how to keep foreground opacity at 100%, and only reduce the background opacity, that would be ideal.