127

I remember there used to be a setting under Compiz that set a keyboard shortcut for moving applications between physical (but combined as a single xscreen) screens, similar to moving between logical screens, like Ctrl-Alt-Shift- / / / .

Any way to do this under Unity?

  • 4
    Possible duplicate? - http://askubuntu.com/questions/22207/quickly-place-a-window-to-another-screen-using-only-the-keyboard – jrg May 24 '12 at 18:01
  • That is the Compiz setting I used to use. Was hoping that there was a way to do it under pure unity. – Andrew Bolster May 25 '12 at 10:08
  • 2
    All Unity is is a huge, big compiz plugin. – jrg May 25 '12 at 11:24
  • After playing around with keybinds for a while, I've been liking Super+X as a next-monitor keybind. (on a 2-monitor setup, that always just flips to the other monitor.) I can quickly hit it with one hand. (super = windows-key.) super+z might be even easier to hit, but it doesn't have the "x for exchange" mnemonic going for it. – Peter Cordes Apr 16 '15 at 19:39
  • I can't find this option in the Put plugin on Ubuntu 15.10. – Nordlöw Mar 21 '16 at 18:21

6 Answers6

144

As @jrg mentioned, this is still possible as Unity (Unity 3D, not the low-power 2D version) is largely built using Compiz.

You'll need to install the Compiz Config Settings Manager Yourself though. Precise steps are:-

  1. Install CompizConfig Settings Manager using apt-get install compizconfig-settings-manager compiz-plugins-extra.
  2. Run it (just type Compiz in the dash and you'll see it).
  3. Click Window Management.
  4. Enable the Put plug-in (select the check-box).
  5. Click on Put.
  6. Configure the shortcut for Put to next Output (click the pencil icon next to the keyboard shortcut for Put to next Output.
  7. Logout and login again for the changes to take effect (from the comments!)
Jason O'Neil
  • 1,888
  • 9
    requires a logoff, but yes, this works great! – Andrew Bolster Oct 24 '12 at 12:13
  • 3
    Could anyone elaborate on point 4? I've enabled "Put" successfully, but I don't understand how/where to set a shortcut for it? – user50849 Dec 07 '12 at 13:43
  • 1
    When you select 'Put' the window changes and shows 3 more Tabs with settings for Put. On the Bindings tab you can then set key bindings. – Christoph Grimmer Feb 05 '13 at 09:54
  • @user50849 You have got to click on 'Put' – Yatharth Agarwal Mar 05 '13 at 13:15
  • 6
    One problem (bug) with this. If you use "grid" to move (snap) a window into a corner of one screen for example, for whatever reason, when you try to move it to the other screen, it will move for a second, then bounce back to where it came from. If this window was unconstrained (not snapped to any grid boundary) then it moves fine. But if constrained at all it won't move properly. Somewhat annoying. :-/ – The111 Nov 22 '13 at 22:20
  • 7
    If you really don't want to log-off, you can hit Alt-F2 and execute compiz --replace – Armando Pérez Marqués May 21 '15 at 16:44
  • Ubuntu 15.04. Not working. I press the hotkey I assigned and nothing happens. – Barafu Albino Jun 17 '15 at 11:11
  • 2
    How do you set the shortcut (e.g., super+alt+right-arrow)? – joniba Nov 02 '15 at 09:33
  • This does work in 16.06 for me. Don't forget to logout and back in. – Ron Collins Jan 09 '17 at 17:50
  • I did and it works as soon as I configured. Logout was not necessary! Ubuntu 16.04 – pablo.vix Nov 23 '17 at 02:52
  • I don't see where the settings for step 6 are. Are you still talking about something inside Compiz? – still_dreaming_1 Jun 29 '18 at 23:57
  • Weird bug in 18.04: enabling "Put" seems to disable the Launcher shortcuts (e.g. terminal, home folder, etc.) – Jonathan H Apr 01 '20 at 18:21
  • @joniba click on the Disabled (or key input) button and select "Grab key combination" then press the key combo you want to use. Although for two monitors something like "Ctrl + Alt" would suffice as it will switch between the two monitors. – lkisac Apr 12 '20 at 13:42
  • well I would avoid using "Ctrl + Alt" actually since "Ctrl + Alt + T" is used to open a terminal for example and it would do both actions with that command.. – lkisac Apr 12 '20 at 14:15
40

This is based on my experience without the need for Compiz or any such utility.

When a window is activated (i.e. in-focus) If you press Alt + Space the top menu appears which has options like:

Minimize
Maximize
Move
Resize
etc.

Once that menu appears you need to press M key on your keyboard to select the Move option

Then you can just use the arrow keys to move the windows anywhere (even across monitors)

Deep
  • 511
  • 1
    awesome, in Ubuntu 16.01 there is also a Move to monitor left option – azerafati Aug 09 '18 at 06:26
  • 2
    I want to see this option, but I haven't seen it in 16.04 or 18.04, I'm somewhat annoyed by the compiz solution. –  May 30 '19 at 00:36
15

Move window from left monitor to right monitor: Super (i.e. Windows key)+Shift+right arrow

Move window from right monitor to left monitor: Super(i.e. Windows key)+Shift+left arrow

Kevin Bowen
  • 19,615
  • 55
  • 79
  • 83
Johan hvn
  • 281
  • 3
  • 7
13

Compiz Config Settings Manager's Put plug-in works great on 13.04 and 14.04

Special hint:

  • Click on Put -> Misc. Options -> Activate "Avoid Offscreen": Avoids putting parts of the moved window to a hidden area. Very useful if someone has got monitors with different display resolutions.
malisokan
  • 1,007
  • 1
  • 13
  • 23
6

Compiz put works great, just be carefull if grid is active (it usually is) you'll find a compatibility bug those windows that are already grit to some corner of your workspace will bounce back if you try to put them to another output.

If this happens to you don't panic, just do the following:

Before you send your window to the next output, "ungrid" it by semi-maximizing it to one side ctrl+super+lef or right and bam!, now you can send it and it wont spring back.

It works on both 12.04 and 14.04

( Now, who knows... maybe this is one of those cases where the responsible developer will protest "it's a feature not a bug!" xD )

JorgeArtware
  • 3,527
  • 1
  • 21
  • 23
  • This bug is really annoying and I use the same workaround but when developing it really drives me crazy as my IDE windows sometimes change monitors without warning because I've set them to another monitor, and clicked to minimize them without thinking about it – Cristiano Fontes Dec 05 '17 at 09:18
  • It is definitely super annoying, if I was a better C programmer I'd contribute to remove the bug, maybe another time. – JorgeArtware Dec 11 '17 at 02:41
1

In order to move windows (in case of windows that do not appear "anywhere") and excluding Compiz or other managers, the simple way I've used is this:

  • press Alt+SPACE (should open the windows menu, even if it's also not seen)
  • (pressing M [for Move] does not work for me in Ubuntu 19.04)
  • press twice (skipping the first 2 options: Minimize and Maximize/Unmaximize) + Enter
  • press directional arrows until you see its top-bar on any monitor, and finally press Enter
  • you should now be able to control it normally...
AEM
  • 1,166
temuraru
  • 131