I use manjaro deepin and even thou I love this beautiful desktop environment I really miss a keyboard shortcut that let me move a window from one monitor to the other (2 monitors).

I already tried the next script I used on XFCE:

yaourt -S --noconfirm xorg-xprop xorg-xwininfo xorg-xrandr wmctrl
git clone https://github.com/calandoa/movescreen.git
sudo mv movescreen/movescreen.py /usr/bin
rm -rf movescreen//usr/local/bin/movescreen.py
sudo chmod a+rx /usr/bin/movescreen.py

Menu | All settings | Keyboard | Application shortcuts | Add

/usr/local/bin/movescreen.py left Ctrl+Super+Left

/usr/local/bin/movescreen.py right Ctrl+Super+Right

but it didn't work. I tryed adding this shortcut using deepin Control Center, not the XFCE way.

How can I add a command to move a window to left/right monitor?

4 Answers 4

diff --git a/movescreen.py b/movescreen.py
index b6bd4ad..99b7a7c 100755
--- a/movescreen.py
+++ b/movescreen.py
@@ -23,7 +23,7 @@ if 2 < len(sys.argv):
        # Get focused window
        out = subprocess.check_output(['xprop', '-root', '_NET_ACTIVE_WINDOW']).decode('ascii', 'ignore')
-       id = re.search("window id # (0x[0-9a-f]+),", out).group(1)
+       id = re.search('window id # (0x[0-9a-f]+)', out).group(1)

 # Get screens information
  • Although if I run this script from the terminal it works, when I add it to Deepin Shortcut it doesn't :-|
    – Damon Hill
    Nov 28, 2018 at 17:39

There is an easier (and probably also better) way to this using gsettings.

I suggest using the dconf-editor to modify gsettings. It is also possible to do the following from the command line directly via the gsettings command, but the visual editor is much simpler.

The following is the set up for Fedora, tested on Fedora 30:

1) Get the dconf-editor:

sudo dnf install -y dconf-editor

2) Open up the editor and look up the path to the keybindings

From the gnome terminal:


enter image description here

3) Open up the settings and set the shortcuts as described in the picture above (or use your own shortcuts)

And you're all set


In the dconf-editor, setting the move-to-monitor-left and -right did not work for me. But move-to-side-e and -w works.


On manjaro this is how I do it:

system settings -> shortcuts -> global shortcuts

then search for window to next screen

enter image description here

In my case I have used a custom shortcut Meta + N

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.