Using Ubuntu 14.04, I'm looking into getting a 40" 4k display and have found how to resize windows down to quarter sections of the screen, but I would like the ability to further resize them down if desired. For instance, I would like to keybind the default compiz to take a full screen window and put it in the top left quarter of the screen, but if pressed again, further downsize it to the top left eighth of the screen, or to put the window in the bottom right quarter of the top quarter of the screen (taking up an eighth vertically and horizontally of the screen). Is this functionality hidden within compiz or any other application that I'm not familiar with?
Unity XFCE Window Manager Resize WMCTRL – Set Keybinding to Resize Window to Half Its Size in Chosen Direction
resizeunitywindow-managerwmctrlxfce
Best Answer
The script below can be used as an additional functionality to the "resize-to-quarter" option in 14.04. It can be run with the arguments: "left", "right", "up", "down", to further cut the quarter in eights.
What it does
If you have your window moved to the quarter of your screen:
the script will cut the window in half, either the left, right, top or bottom half, depending on the argument you run it with (see below).
How to use
The script uses
wmctrl
, which is not by default on your system:Copy the script below into an empty file, save it as
organize_w
in the directory~/bin
. Make the script executable. Probably you will still have to create the directory~/bin
. It has the advantage that you can run the script just by the script's name:Add four commands to custom keyboard shortcuts. Open system settings > "Keyboard" > "Shortcuts" > "Custom Shortcuts". Add four commands to key combinations.
On my system, I found four extremely fit shortcuts still available: I would suggest adding the commands under these key combinations:
Shift+Ctrl+Numpad <
effect:
Shift+Ctrl+Numpad >
effect:
Shift+Ctrl+Numpad ^
effect:
Shift+Ctrl +Numpad v
effect:
This way, you can arrange windows like below with a few key strokes:
The script:
edit:
XFCE version
With a few minor changes, the script can also be used to resize wndows into half / quarter or eight on XFCE (tested on 14.04).
Use it exactly like the version for Unity:
(XFCE version also posted on gist.gisthub)