IMPORTANT: this is not mantained anymore but there is an active fork at https://github.com/crazygolem/maximal
A minimal utility that hides the titlebar when a window is maximized in Gnome (and soon also in Cinnamon due to linuxmint/cinnamon#7681).
This is my take on a pretty much demanded feature. It was born out of disconformity with the current state of affairs:
-
The "maximus like" extensions are very clever but dirty, dirty hacks that try to infer the client id in non standard ways, call external tools, hook from many events... don't get me wrong, it's impressive that the extension developers somehow managed to get around the limitations imposed by the "everything CSD" adamant stand of Gnome. But anyway the extensions make the programmer in me cry in despair. Moreover, they all show some rough edges.
-
Another option is to tweak the metacity theme to make the titlebar almost invisible, setting a 0 size font... I'm going to stop here.
-
Finally there is a script around there that is always pulling information from the X system and setting
_GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED
for every client. But it should be the other way around, the script should react to window creation events.
What maximal
does is indeed quite minimal: it listens for normal window creation events and sets the _GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED
property.
To disable it just send a TERM
signal to the process; this restores the previous state of _GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED
for each managed window. When you run maximal
again it will detect every open normal window and make its title hideable on maximize, then enter the main event handling loop as usual.
You can set a whitelist and/or a blacklist of patterns by exporting the environment variables MAXIMAL_WHITELIST
and MINIMAL_WHITELIST
. These variables must contain a comma separated list of regular expressions (as defined here). Whitespace before and after the commas is ignored. The patterns are matched against a target with format <wm_class[0]>::<wm_class[1]>::<wm_name>
; for instance, the target for my current firefox window (showing this page) is Navigator::Firefox::memeplex/maximal: Maximal, a minimal utility that hides the titlebar when a window is maximized in Gnome (also in Cinnamon -master branch-) - Mozilla Firefox
. If no whitelist and no blacklist are given, every client is matched. If there is a whitelist but no blacklist, only whitelisted clients are matched. In there is a blacklist but no whitelist, only clients not blacklisted are matched. If both a whitelist and a blacklist are set, only clients whitelisted but not blacklisted are matched. For convenience, a .*
prefix and a .*
suffix are automatically appended to the pattern.
If you're on Arch or an Arch-based distro (like Manjaro) you can install maximal
from the AUR:
yaourt -S maximal
Otherwise use pip
:
-
For system-level installation run
pip install git+https://github.com/memeplex/maximal.git
-
For user-level installation run
pip install --user git+https://github.com/memeplex/maximal.git
Then add something like the following to your ~/.xprofile
and start a new session:
export MAXIMAL_WHITELIST=...
export MAXIMAL_BLACKLIST=...
maximal &
- Add ability to disable / reenable.
- Allow to apply only to wm classes matching some pattern.
- Allow pip installation.
- Check if it works fine with multiple monitors.
- Make arch PKGBUILD.
- Remove
time.sleep
or understand why it's needed.