21
What you need:
sudo apt-get install wmctrl
)How to do it:
gnome-keybinding-properties
and click "Add"
wmctrl -r ":ACTIVE:" -e 0,0,0,1280,1024
gravity,x-coordinate,y-coord,width,height
. I have gravity set to 0, which is default (I don't actually know what gravity does), x and y-coordinates set to 0 and 0, and the width and height are the dimensions of the left monitor: 1280 and 1024. Change this to match your configuration.wmctrl -r ":ACTIVE:" -e 0,1280,0,1366,768
You may have to tweak the coordinates and dimensions to account for the top (usually 24px tall) or side panels.
For more reading on wmctrl, check out http://movingtofreedom.org/2010/08/10/arranging-windows-from-the-gnulinux-command-line-with-wmctrl/
I hope this helps!
As per this https://askubuntu.com/questions/75631/how-do-i-install-the-gnome-keybinding-properties-program answer. For current versions of gnome/ubuntu after installing wmctrl use: "gnome-control-center keyboard" or via GUI "settings -> devices -> keyboard" and then click the "+" in the bottom.
– user3605780 – 2019-09-11T10:26:13.2037I recommend using -1 in the last two fields to leave the windows dimensions unchanged when it moves (e.g., wmctrl -r ":ACTIVE:" -e 0,0,0,-1,-1) – Sk606 – 2012-11-27T18:22:01.867
24
If you use Compiz as the window manager on your Ubuntu installation (Which I believe comes pre-installed with 11.04). Open Compiz Config Settings Manager (do a sudo apt-get install compizconfig-settings-manager
if you don't have ccsm installed.)
Window Management -> Put
Put To Next Output
option in the Bindings
tab.This will allow you to get the same functionality as what you require. The Put plugin has loads of other productivity increasing options too. Enjoy.
2
If you haven't got the Pug plugin, you can install the package compiz-plugins-main
which also installs some other plugins. I also had to restart X after I had set a shortcut.
I think that this should be the accepted answer. – MasterAM – 2016-08-28T14:14:43.343
works fine on ubuntu 18.04 + unity – Kennet Celeste – 2018-09-15T17:12:25.770
this should be the accepted answer – Unantsika – 2019-12-17T10:46:18.747
1This works great for me on Ubuntu 12.04 64bit with Unity. Remember though that Compiz is a dangerous tool, many of its (seemingly harmless) options can easily break your setup, so don't mess around with it unless you've got backups and/or are sure your steps are safe. – Sicco – 2013-01-08T11:14:35.477
2It appears that put was removed/omitted in 13.04. – Sean McCleary – 2013-08-26T17:40:46.267
23
Compiz and Unity will be soon obsolete.
shift + meta(super/windows) + arrows
. For putting to corners you need additionally https://extensions.gnome.org/extension/39/put-windows/ .meta + left right moves in a single window but this fills in the gaps. I couldn't make sense of the extension though - it was moving other windows around in a strange way aswell and there seems to be no documentation – JonnyRaa – 2018-05-25T14:57:35.147
@JonnyLeeds Disable unused shortcuts the may overlap. – Waldemar Wosiński – 2018-05-30T05:42:06.700
It's quite new but available and easy. – Shihe Zhang – 2018-12-22T06:11:43.583
1best answer!!!! – otaviodecampos – 2019-03-21T19:50:32.577
Great, thanks for the answer! – Guilherme Garnier – 2019-05-21T17:13:17.990
0
If you're using Budgie Desktop Environment,
then the default shortcut for moving window into monitor is Shift + Super + Arrow
.
Related: https://askubuntu.com/q/141752/13330
– AlikElzin-kilaka – 2018-02-04T12:56:59.400