Skip to content
Snippets Groups Projects
Commit b99f1524 authored by James Vasile's avatar James Vasile
Browse files

Only print interesting lines in dumping swaywin

parent cc8e7feb
No related branches found
No related tags found
No related merge requests found
......@@ -188,11 +188,21 @@ class SwayWin(Window):
def dump(win:Window):
win = win.swaywin
print(f"Class/title/name/role: {win.window_class} / {win.window_title} / {win.name} / {win.window_role}")
print(" Type:", win.type)
print(" Id / PID / App ID:", win.id, win.pid, win.app_id)
print(" Focused:", win.focused)
print(" Leaves:", win.leaves())
if win.window_title != win.name:
print(f"Class/title/name: {win.window_class} / {win.window_title} / {win.name}")
else:
print(f"Class -=> title/name: {win.window_class} -=> {win.window_title}")
if win.type != "con":
print(" Type:", win.type)
print(f" Id (PID) App ID / role: {win.id} ({win.pid}) {win.app_id} / {win.window_role}")
if win.focused:
print(" Focused:", win.focused)
l = win.leaves()
if l:
print(" Leaves:", " | ".join([x.name for x in l]))
d = win.descendants()
if d:
print(" Descendants:", " | ".join([x.name for x in d]))
print(" Workspace:", win.workspace().name)
print(" Workspaces:", " | ".join([x.name for x in win.workspaces()]))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment