Skip to content

Commit 90a443a

Browse files
fixed __main__.py
1 parent c59a47e commit 90a443a

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

display_server_interactions/__main__.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@
55

66

77
def main() -> None:
8-
window = DSI.get_active_window()
8+
with DSI() as dsi:
9+
window = dsi.get_active_window()
910

10-
print("Active window: ")
11-
print("\tName: {}".format(window.name))
12-
print("\tPID: {}".format(window.pid))
13-
if window.xid:
14-
print("\tXID: {}".format(window.xid))
15-
print("\tGeometry: {}".format(window.geometry))
11+
print("Active window: ")
12+
print("\tName: {}".format(window.name))
13+
print("\tPID: {}".format(window.pid))
14+
if window.xid:
15+
print("\tXID: {}".format(window.xid))
16+
print("\tGeometry: {}".format(window.geometry))
1617

1718

1819
if __name__ == "__main__":

0 commit comments

Comments
 (0)