With screens getting larger and/or wider (some with aspect ratios over 21:9 nowadays), the typical way to snap windows to half the screen on the left or right becomes pretty useless. That is, none really wants to have a text editor window that is half the screen on a 34" wide monitor with 3440 x 1440 resolution! (That would be a text window that is 1720 x 1440 or almost 40cm wide!)
To make better use of the screen real state, I have created a few scripts to make windows full height but only a portion of the whole screen (say, one third or one quarter). I then assign each of those scripts to a specific key combination.
I am using xdotool to do all this so before you try you may want to install is using: sudo apt-get install xdotool. Help for xdotool can be found here.
Here is one of the scripts. This one is for the first window on the left taking only 25% of the screen width and 100% of the height:
#~/.resize_window_location_1
#!/bin/bash
xdotool getactivewindow windowsize 25% 100% # width and height
xdotool getactivewindow windowmove 0 0 # Moves to 100,y
Then, for the second one, I use is:
#~/.resize_window_location_2
#!/bin/bash
xdotool getactivewindow windowsize 25% 100% # width and height
xdotool getactivewindow windowmove 320 0 # Moves to 100,y
And so on and so forth with the last line changing based on the position (as an example these could be 0, 320, 640, and 960). Note that in this case I had to manually add the position as 320 as I was unable to use percentage of the screen size. I am not sure what units the 320 refers to (maybe characters) as it is does not seem to be pixels.
Then I go to: All settings > Keyboard menu and on the Shortcuts tab I create new custom shortcuts. I use Shift+Ctrl+Super+Fn, that run one of the command: ~/.resize_window_location_n (for n=1,2,3, and 4).
All this works quite well except for one small annoyance: the first window which, in spite of me specifying its position as 0 0, it is always put a few characters to the right of the launcher. I have tried setting the position as negative without any luck, instead, it is always placed a few characters to the right of the launcher.
Do any of you know a more elegant way of doing this AND/OR a command-line to move the window all the way to the left, just next to the launcher.