Deepin Keyboard Shortcuts – Move Window to Other Monitor

deepinkeyboard shortcutsmanjaromulti-monitor

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?

Best Answer

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):
 else:
        # 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
Related Question