One of the issues i had when i scrapped Windows and installed Linux Mint was that i missed how easy it was to hide the Firefox window title bar in order to gain that extra bit of vertical real estate under Windows. With Mint and the KDE desktop environment i found several options to accomplish a similar result, but i liked none of them and so off i went seeking a better alternative.
For almost all of the the options i found, most everyone either advised to install the Hide Caption Titlebar Plus extension for Firefox, which works on Linux, more or less, or to apply a custom window style using the Window Actions and Behavior settings in KDE (System Settings > Workspace > Window Management on Mint 18.x). The problem with the former is that it wasn’t very pretty in my case; the close, minimize and restore buttons were ugly and sometimes overlapped other controls, plus i prefer to do things without installing more Firefox extensions if possible. The problem with the latter option is that, while it is indeed trivial to remove the Firefox window title bar using the Window Management tool provided by KDE, this left me with a borderless window that couldn’t be resized when it wasn’t maximized.
By accident i stumbled upon what i personally think is a better solution while playing with the KDE Window Decorations utility in System Settings > Appearance > Application Style > Window Decorations settings and no additional software was needed.
On the Theme tab of the Window Decorations utility, you’ll see the previews of whatever window themes you have installed. In Mint 17.x/18.x with KDE, i think the defaults are Breeze and Plastik.
For this to work, you have to be using either the Breeze theme or another one that supports windows-specific overrides (the Plastik theme does not, nor do any of the custom themes i tried). Using Breeze as the example, if you click on the little tool icon on the lower-left of the theme preview, you’ll get a menu which opens the settings UI for the theme.
On the Windows-Specific Overrides tab you can add a couple of window specific styles for a given window, or even all windows if you want. The only two options are to change the border size and hide the title bar. These options are not nearly as comprehensive as those found in the System Settings > Workspace > Windows Management > Window Rules utility, but the difference between the two is that, as previously mentioned, you lose the window border and thus the ability to resize the window with the mouse when removing the title bar using the Window Rules utility, while you retain the window border when using the Windows Decorations utility.
So to accomplish what we want, simply click that little tool icon on the window theme preview and switch to the Windows-Specific Overrides tab. From here, click Add and a utility to identify the window for which you want to remove the title bar will be displayed.
In this window, set the Matching window property to Window Class Name and in the Regular expression to match field, key in
Firefox. Optionally, if you have Firefox running, you could click the Detect Window Properties button and then click the cursor on the Firefox window to auto-detect the class name. If for some reason you wanted to remove all title bars for all windows, set the regular expression to
.* (that’s a dot followed by an asterisk). In the next section, i enabled the Border size option and set it to “Tiny” for aesthetic reasons. Most importantly, you’ll want to select the Hide window title bar option, then click “OK” and “Apply” and you’re done with this part.
The caveat with this method verses using the Hide Caption Titlebar Plus Firefox extension, is that we lose our browser window exit, restore and minimize window controls and so you’ll have to get used to exiting Firefox using another method such as a keyboard shortcut, but what i prefer is to simply middle-click the task bar icon to kill the Fox. This is easily accomplished by right-clicking any task bar icon and selecting the Task Manager Settings menu item, then setting the On middle-click option in the General section to “Close Window or Group”. Note that i personally do not group windows.
Returning to Firefox, you may still have a bit of a problem in that you will need a way to drag the window so we can restore (un-maximize) it, resize it and move it around since our title bar is now gone. My solution was to simply add a bit of fixed space to the end of the tab bar (i set tabs to be on top). This is really only needed when you have enough tabs open so as to fill the space on the tab bar. I suppose there are a couple of ways to accomplish this, including a
userChrome.css hack, however the easiest way is to put the browser in customize mode and drag one or more fixed-width spaces to wherever you want on the tab bar.
KDE, or whatever, should take care of the rest in that it will allow you to drag the window using the empty space on the tab bar.
So hopefully you now have an easy way to exit, move and resize Firefox, along with a bit more screen real estate, and it can all be done without having to edit a single configuration file.