私はmanjaro deepinを使用しており、素晴らしいデスクトップ環境が好きですが、あるモニターから別のモニター(2つのモニター)にウィンドウを移動できるキーボードショートカットが本当に恋しいです。
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
メニュー|すべての設定キーボードアプリショートカット|
/usr/local/bin/movescreen.py left
Ctrl+スーパー+左
/usr/local/bin/movescreen.py right
Ctrl+スーパー+右矢印
しかし、成功しませんでした。 XFCEの代わりにDeep Control Centerを使用してこのショートカットを追加してみました。
ウィンドウを左/右モニタに移動するコマンドを追加するにはどうすればよいですか?
ベストアンサー1
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