|
1 | | -import sys |
2 | 1 | import time |
3 | 2 |
|
4 | 3 | import Xlib.protocol |
5 | 4 | import Xlib.X |
6 | 5 |
|
7 | | -sys.path.insert(0, "../src/") |
8 | | -from ewmhlib import Props, getDisplaysInfo, EwmhRoot, EwmhWindow |
| 6 | +import ewmhlib |
9 | 7 |
|
10 | 8 |
|
11 | 9 | def main() -> None: |
12 | 10 | print("ALL DISPLAYS") |
13 | | - print(getDisplaysInfo()) |
| 11 | + print(ewmhlib.getDisplaysInfo()) |
14 | 12 |
|
15 | | - root = EwmhRoot() |
| 13 | + root = ewmhlib.EwmhRoot() |
16 | 14 |
|
17 | 15 | print("DESKTOP LAYOUT") |
18 | 16 | print(root.getDesktopLayout()) |
@@ -55,7 +53,7 @@ def main() -> None: |
55 | 53 | if w: |
56 | 54 | print("REQ FRAME EXTENTS") |
57 | 55 | print(root.requestFrameExtents(w)) |
58 | | - win = EwmhWindow(w) |
| 56 | + win = ewmhlib.EwmhWindow(w) |
59 | 57 | name = win.getName() |
60 | 58 | print("NAME", name) |
61 | 59 | visName = win.getVisibleName() |
@@ -94,16 +92,16 @@ def callback(event: Xlib.protocol.rq.Event): |
94 | 92 | print("MOVING/RESIZING") |
95 | 93 | root.setMoveResize(w, x=100, y=100, width=800, height=600, userAction=True) # Equivalent to win.setMoveResize() |
96 | 94 | print("BELOW ON") |
97 | | - win.changeWmState(Props.StateAction.ADD, Props.State.BELOW) |
| 95 | + win.changeWmState(ewmhlib.Props.StateAction.ADD, ewmhlib.Props.State.BELOW) |
98 | 96 | time.sleep(4) |
99 | 97 | print("BELOW OFF") |
100 | | - win.changeWmState(Props.StateAction.REMOVE, Props.State.BELOW) |
| 98 | + win.changeWmState(ewmhlib.Props.StateAction.REMOVE, ewmhlib.Props.State.BELOW) |
101 | 99 | time.sleep(4) |
102 | 100 | print("DESKTOP") |
103 | | - win.setWmWindowType(Props.WindowType.DESKTOP) |
| 101 | + win.setWmWindowType(ewmhlib.Props.WindowType.DESKTOP) |
104 | 102 | time.sleep(4) |
105 | 103 | print("NORMAL") |
106 | | - win.setWmWindowType(Props.WindowType.NORMAL) |
| 104 | + win.setWmWindowType(ewmhlib.Props.WindowType.NORMAL) |
107 | 105 | print("MAX HORZ ON") |
108 | 106 | win.setMaximized(True, False) |
109 | 107 | time.sleep(4) |
|
0 commit comments