Marco XPresent compositor transparent title bars

Operating system is Ubuntu MATE 23.10. I'm trying to configure transparent title bars using the Xpresent compositor. I got it working with Compiz, but would prefer the Marco built-in: Xpresent compositor. Xpresent is lighter weight, and I've been reading that Compiz will soon be phased out.

Why do I want this? My primary OS has been Windows 7 for a decade, but is becoming difficult to continue as more software becomes unsupported. So I'm considering making Ubuntu MATE my primary OS. I like the Aero interface. Xpresent can provide transparent task bar and transparent window background in the console app. The last piece that is missing is transparent title bars.

Has anyone accomplished this? I've spent many hours searching for how Xpresent is configured, to no avail; there doesn't appear to be a conf file for it, nor can I find it in dconf. So perhaps it is not configurable, and what you see is what you get.

Thanks.

1 Like

Hi, @guyr!

I think, marco with xpresent will display transparent titlebars only if your GTK theme provides information about titlebar transparency, so you have to edit the theme directly (probably add an alpha channel to your theme's colors).

A more universal approach is to configure picom compositor, which comes preinstalled with Ubuntu MATE. You have 3 options in MATE Tweak, each corresponding to a certain script:

  1. "Marco (picom: Xrender)" --> /usr/bin/marco-xrender ;
  2. "Marco (picom: GLX)" --> /usr/bin/marco-glx ;
  3. "Marco (picom: Hybrid)" --> /usr/bin/marco-xr_glx_hybrid .

These scripts are identical, however, they are kept as separate files.

The script checks your home folder for a picom config file: ~/.config/marco-picom.conf .
Sample configuration: /usr/share/doc/picom/examples/picom.sample.conf .

So, you can provide a config file OR edit the script of your choice. You have to set frame-opacity option.

Hope this helps.

4 Likes

@ironfoot, thanks for the reply. I actually have worked with the picom options a little bit. I'm attaching a screen capture of picom Xrender. I haven't spent a lot of time attempting to see if I can improve this. I simply copied the supplied /usr/share/doc/picom/examples/picom.sample.conf into my home/.config directory and made the following changes:

  • backend = "xrender",
  • inactive-opacity = 0.8;
  • frame-opacity = 0.7;

As you can see, the results contain quite a few strange artifacts. I'm using the YaruOK theme; I see the same results with TraditionalOK. Oddly, the MATE Tweak window appears to be artifact-free; I don't know why. If I switch to Compiz, using the same theme, the display is flawless, including the transparent title bars. But of course the CPU usage is significantly higher.

Since the display with Xpresent has none of the artifacts, I'd like to see if I can somehow get transparent title bars in Xpresent. Do you happen to know where I can ask questions about the Xpresent extension?

Thanks.

1 Like

With TraditionalOK theme I have following results:

  • using unmodified sample config:

  • using modified /usr/bin/marco-xrender script with your parameters ( inactive-opacity = 0.8 , frame-opacity = 0.7 ) :

I think, you have to apply other parameters from the script to your config. The only artifact I see is the non-transparent area in titlebar.

MATE Tweak uses modal window, the other ones are resizable. I believe this frame artifact is related to Marco: Backport invisible resize borders by vkareh · Pull Request #503 · mate-desktop/marco · GitHub .

Xpresent is a part of Xorg: xorg / lib / libXpresent · GitLab . It's simply a library used by Marco in compositing mode: marco/src/compositor at master · mate-desktop/marco · GitHub, you may ask Marco developers.
Marco/picom integration scripts are coming from MATE Tweak: GitHub - ubuntu-mate/mate-tweak: Tweak tool for the MATE Desktop .

4 Likes

@ironfoot, thank you for your time. By modifying marco-xrender, I see exactly what you are seeing. So the only remaining artifact is the non-transparent area of the title bar.

I'll pursue in the locations you mention to see if I can get either (1) Xpresent providing transparent title bars, or (2) picom xrender to fix the non-transparent area in the titlebar. Either solution would be acceptable to me.

4 Likes

You are welcome, @guyr!

1 Like

No disrespect to anyone here. I believe a lot of guys will have much better technical knowledge than I have but, I have some experience with setting up Compiz since the early 2000s and there has been constant talk of getting rid of Compiz. I say keep using it if you want and wait for your system to say no... I used to be an Admin tester, installing and running Linux systems. I didn't do much with command line this or that nor did I do much coding. I changed very little in any files, preferring the graphical interface tools but, anyways that's something else.
Surely nowadays most hardware is capable of running Compiz with little drain on modern resources.
I recently upgraded to Ubuntu Mate 23.10. Now before the 'Live' upgrade my Compiz WM was working perfectly well (as it has done for many years now on numerous systems I've setup) but, after the upgrade I noticed it had lost it's settings and my 'Emerald' decorator had been reset to what I believe is a @Mate' default with completely different borders, controls, etc.
I seem to have traced this to 'picom' now being a default startup program and interfering with Compiz.
So, I have stopped picom from starting and the system flies, all the while using Compiz as the WM and Emerald as the decorator.
I like my system and will continue using Compiz till something dies. The variation of themes and adjustments to be made for individual tastes are mostly done so easily . I have tried other compositors in the past with various themes installed from others premade but, I've just not had what I wanted. Compiz gives me that. I hope you have some luck with what you are trying to achieve but, for me Compiz is the answer for the foreseeable future - unless you have an old processor or low system resources. I don't run Compiz on my 16 year old Dell for example but, it runs fine on my 10 year old Lenovo with the i% processor and 8GB RAM. I have a 2 year old Geekom minipc now as my main driver and it has ample power for something as simple as a Window Manager to run in the background. I have had absolutely no problems with Compiz for years. Don't let apparent lack of support put you off. It is your machine to run the way you want it to and looking like you want it to as well. Don't be limited by "must have the modern stuff to run smoothly" s**t. Do what you want. You can always experiment on another machine if you have one - I do and it pays dividends. I'll stop now... hope it has helped.

3 Likes

I also have a strong feeling that compiz will stay until X is replaced by Wayland.

And for Wayland there will be Wayfire, the spiritual successor of Compiz, created by the same developer(s).

Here is a little showcase of what wayfire can look like at this moment https://www.youtube.com/watch?v=NwBcCH1cJRI

2 Likes

@Deke55 Thanks for the reply. As I mentioned in my original post in this thread, I can get all the effects I want with Compiz. The problem is that Compiz uses about 20% of the CPU to accomplish this. I'm trying to find something less resource-hungry. If I'm not able to accomplish that, then I can always fall back to Compiz.

1 Like