11

In Windows I can use the "Windows Key + Arrows" snap feature to quickly move windows between monitors in a multi-monitor setup. I'm looking for a way to do this same thing in Linux. I've tried Cinnamon, KDE, and XFCE and haven't had any luck figuring out how to get this functionality in any of those DEs.

JDiPierro
  • 288
  • 3
  • 9
  • Are you specifically asking on how to get the `multiple monitor` piece working? Your question is a bit confusing since it mentions that as an issue, but continues on about how you can use the Maximize shortcut but Minimize is "buggy"... I am assuming so since KDE, Cinnamon/Gnome3+, and Unity all have the single monitor snap built in by default (granted, it's `Ctrl+Super+Arrow`) - the only limitation of those that I'm aware of is it jumping to another monitor. – nerdwaller Aug 12 '13 at 14:32
  • 1
    Yeah, sorry.. I'm specifically looking for the ability to move a window between monitors. – JDiPierro Aug 12 '13 at 15:05

4 Answers4

3

the information below is deprecated
this behavior is now default in Linux Mint 18.3
simply go to the Keyboard settings




On Linux Mint 18 16.04:

(1) Download pre-requisites.

sudo apt install xdotool wmctrl

(2) Create a directory and download a file that contains code for moving a window to the next monitor. Instead of ~/bin you can choose something else.

mkdir ~/bin && cd $_
wget https://makandracards.com/makandra/12447-how-to-move-a-window-to-the-next-monitor-on-xfce-xubuntu/attachments/2677 && mv 2677 move-to-next-monitor`

(3) Make sure the script has the ability to be ran.

chmod +x move-to-next-monitor

(4) From the Menu in the bottom left corner of your desktop go to Preferences --> Keyboard.
Press Super, type 'keyboard', press Enter.

(5) Go to the Shortcuts tab. At the bottom of the list on the left, click Custom Shortcuts. Use the 'Add custom shortcut' button at the bottom of the window. Give your shortcut a name and then click the button with a folder icon that says (None). Locate the file we downloaded at ~/bin/move-to-next-monitor.

(6) Double click one of the fields below: 'unassigned' and press your chosen key combination.

Now try it out!

[original source]
https://makandracards.com/makandra/12447-how-to-move-a-window-to-the-next-monitor-on-xfce-xubuntu

Anton
  • 131
  • 4
3

I use KDE and there is a keybinding for this. From the K menu, run "System Settings" (you can search for that phrase in the search field if the icon is not already showing). Then go to "Shortcuts and Gestures", then "Global Keyboard Shortcuts", choose "KWin" from list of KDE components. There is an action called "Window to Next Screen". Assign a hotkey (I use Ctrl-Alt-Shift-Right) for mine. It's strange that there isn't a hotkey for Window to Previous Screen. But, since I only have 2 monitors, it acts as a toggle between the left and right monitor. I should add that I'm using Linux Mint 13 64-bit with KDE 4.8.5.

user245106
  • 46
  • 1
  • 1
    Even better: You can have the *exact* same behaviour of Windows's Win+Left/Right arrow keys in KDE: Go to the same kwin keyboard shortcuts dialog and set the "Quick Tile Window To the Left/Right" options. It works across multiple monitors and it comes in *very* handy for placing two applications side by side on the screen – doublehelix Jan 01 '15 at 09:04
2

On Xubuntu 16.04:

Perform following commands in terminal (based on this git instructions) and then assign a keyboard shortcut. Executing the shortcut should move the active window to the other monitor.

  1. Install xdotool

    sudo apt-get install xdotool

  2. Download file from the git repository in your desired folder

    wget https://raw.githubusercontent.com/jc00ke/move-to-next-monitor/master/move-to-next-monitor

  3. Make the file executable

    chmod +x move-to-next-monitor

  4. Move the file to a folder that is in your path, so that move-to-next-editor will be executed from anywhere.

    mv move-to-next-monitor /somewhere/in/your/$PATH

Assigning a keyboard shortcut (based on this blog)

  1. Open up the Xfce settings → Keyboard → Keyboard shortcuts

  2. Add an entry for move-to-next-monitor and assign a keyboard shortcut to it.

  3. It should be active right away, so try it on the settings window. :)

loved.by.Jesus
  • 341
  • 4
  • 11
-1

More info.

According to this post: https://unix.stackexchange.com/questions/48456/xfce-send-window-to-other-monitor-on-keystroke

There's a github repos with an enhanced code: https://github.com/jc00ke/move-to-next-monitor

Sylvain
  • 111
  • 2