Hatred's Log Place

DON'T PANIC!

Nov 9, 2018 - 2 minute read - [ru] [en] - linux

Gnome/Mate terminal maximized by default

…In case, when Compiz is used as Window Manager.

With Compiz

I use Mate and Compiz as Window manager. According information from the Internet, there is only one way to run Gnome Terminal (and any derivative terminals, like Mate Terminal): run it with option --maximize. Better solution implemented in KDE Terminal - Konsole, it just save last window geometry.

Command line option good… But… you should point it everywhere where terminal runs: menu entries, shortcuts, application settings where terminal pointed… There is no way to point such option for application runs in terminal.

So, solution: use ability of WM to apply window attributes according some window properties (look into xprop).

Compiz allow to maximize all windows by default, or apply layout settings selective. Just run ccsm and go to Windows Management -> Place Windows -> Fixed Window Placement. After that, look into Windows with fixed placement mode and click New:

Type class=Gnome-terminal to the Window field and select Maximized in Mode field:

Now, Gnome terminal windows will be handled by Compiz and maximized by default.

Same can be done by Windows Rules plugin. Just enable it, open settings and in Maximized matches type class=Gnome-terminal:

For Mate Terminal or some other, observe window class via xprop.

With Devilspie2

Another way, use Devilspie, or same tools:

Solution that work in Cinnamon, GNOME, Mate and other DE with devilspie2: put to the ~/.config/devilspie2/gnome-terminal.lua next code:

if (get_window_class() == "Gnome-terminal") then
    maximize();
end

Read more about allowed functions: https://git.savannah.gnu.org/cgit/devilspie2.git/plain/README.

Add devilspie2 to auto start. To apply without re-login: Alt+F2 and type devilspie2. Action will be applied to the existing Terminal windows and to the newly created.

Tags: linux terminal wm

Why may Linux driver developers hate distros like CentOS?

comments powered by Disqus