Meta + Arrow Keys to move windows between monitors?

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.


Solution 1:

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.

Solution 2:

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