diff options
author | zachir <zachir@librem.one> | 2023-05-23 15:01:20 -0500 |
---|---|---|
committer | zachir <zachir@librem.one> | 2023-05-23 15:01:20 -0500 |
commit | 32d82fba2c762efccb356c2a0b3e408068cc6e03 (patch) | |
tree | ddda5e6f41956e625eb40a2191309b5542ee5c4c /mwarp.py | |
parent | f3e17b53a3351fa6f3c090a76c7680084d1d2eac (diff) |
Total reorganization, we're moving on from X
Diffstat (limited to 'mwarp.py')
-rwxr-xr-x | mwarp.py | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/mwarp.py b/mwarp.py deleted file mode 100755 index abe34b8..0000000 --- a/mwarp.py +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env python3 -import subprocess -import sys - -arg = sys.argv[1] - -screeninfo = [ - s for s in subprocess.check_output("xrandr").decode("utf-8").split()\ - if s.count("+") == 2 - ] - -if arg == "left": - match = [s for s in screeninfo if s.endswith("+0+0")][0] -elif arg == "right": - match = [s for s in screeninfo if not s.endswith("+0+0")][0] - -data = [item.split("x") for item in match.split("+")] -numbers = [int(n) for n in [item for sublist in data for item in sublist]] -coord = [str(int(n)) for n in [(numbers[0]/2)+numbers[2], (numbers[1]/2)+numbers[3]]] - -subprocess.Popen(["xdotool", "mousemove", coord[0], coord[1]]) - |