Is there a way to set the maximum allowed size for maximized windows?
Let me explain, I wish that the maximized windows do not cover the entire desktop, but I can set a margin or area to leave a part of the desktop visible.
For example:
I found a program that does exactly that but only for windows: Change The Maximum Window Size - gHacks Tech News. I imagine there must be something similar for Linux but I can't find it.
After many tests, solutions using commands and complicated scripts, etc, the best and simple solution that I found was using Conky widgets (yes, amazing); I found this solution accidentally while installing a widget I saw that all maximized windows are fixed to keep the widget in desktop visible.
The important part of the widget is "own_window_type panel" to create a window like a panel in your screen.
Then my solution was create a empty and transparent widget for each position of screen when I need a margin(left, top, bottom, right)
Left widget example:
All widgets are similar only changing size and the position in the screen.
This very simple solution works like a charm :)
This can be done manually for terminal, Vim,Google Chrome.
You can use xrandr to get/set the screen resolution and then use wmctrl to resize your window
A bash script to resize windows to half their size with
wmctrl
isTo move the windows, go to
Settings
,Window Manager
, and click theShortcuts
tab. The actions you are looking for are namedTile window to the left
,Tile window to the top-right
, etc.You can check out a GitHub Repo here
Hope this helps! Best of Luck ;)