How to hide i3wm's title bar properly

In i3wm, you can’t directly hide the title bar for stacked/tabbed containers. This article will enlighten you with a neat workaround.

i3wm ricing

Featured image

If you consider yourself a Linux nerd, chances are you must already be using i3, or at least know of it. For those who don’t, i3 , often referred to as i3wm, is a lightweight window tiling manager which has earned its name in the business thanks to its speed, and a nicely done documentation . I’ve been using i3 for over a couple of years now, and recently switched to i3-gaps , its fork, for a fundamental reason, it looks better! While using it, I noticed that the title bar in tabbed and stacked modes look awful, and quite frankly, it’s of no use to me since I am given relevant information about the opened windows through Plasma’s panel. Hence I decided to get rid of it. After some searches online, I found out that it isn’t possible to completely hide the title bar, and this was asserted by AirBlader , i3-gaps’ developer, in a Reddit thread . Hence I decided to try out a workaround.

The Workaround #

In i3, though you can’t hide the title bar directly, you can, however, format the title of the title bar, using title_format and you can define the title’s typography also using the font command. I exploited these in my workaround, the results of which were quite satisfying. Results

The workaround simply uses font command to indirectly control the height of the title bar, while the title_format command is used to make the title transparent. The transparency can be achieved through the alpha attribute of <span> in Pango markup .

# Hide title bar for stacked/tabbed containers
font pango:DejaVu Sans Mono 0

#for_window [class=".*"] title_format "<span alpha='1'>%title</span>"

Update:

I’ve noticed that setting alpha='1' isn’t a good workaround since it makes the text transparent, and the color falls back to the desktop background. Therefore, I’ve commented out the previously assumed solution in the above code. This solution works for normal text, but for now, you’ll just have to bear with the glyphs.

Simply place this inside your i3 config file , most probably ~/.config/i3/config.

Though font pango:DejaVu Sans Mono 0 should be sufficient for hiding the title, I noticed that it doesn’t hide glyphs such as Kanji.
Visible glyphs Hence, title_format, along with alpha='1' attribute must be used to properly hide the title.

That’s it for this post. Have fun tweaking around!



Comments

Leave a reply