Skip to content

Commit 2e4d3ce

Browse files
author
Tony Crisci
committed
format examples
1 parent 63c8cf2 commit 2e4d3ce

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

examples/nth_window_in_workspace.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from subprocess import check_output
1010
import i3ipc
1111

12+
1213
def get_windows_on_ws(conn):
1314
return filter(lambda x: x.window, conn.get_tree().find_focused().workspace().descendents())
1415

@@ -46,11 +47,11 @@ def main(args):
4647

4748
workspace = workspace_by_name(conn, args.workspace) # Find workspace.
4849
if workspace is None:
49-
print("Workspace %s not found, making it."%args.workspace)
50+
print("Workspace %s not found, making it." % args.workspace)
5051
conn.command("workspace " + args.workspace)
5152

5253
else:
53-
windows = list(workspace.leaves()) # Find windows in there.
54+
windows = list(workspace.leaves()) # Find windows in there.
5455
if args.filter == 'visible':
5556
windows = filter(window_is_visible, windows)
5657
elif args.filter != 'none':
@@ -78,7 +79,7 @@ def main(args):
7879
print("Focussing %d" % window.window)
7980
conn.command('[id="%d"] focus' % window.window)
8081
else:
81-
print("Did not find window(%s) going to workspace anyway."%args.select)
82+
print("Did not find window(%s) going to workspace anyway." % args.select)
8283
conn.command("workspace " + args.workspace)
8384

8485
if args.mode != 'no':
@@ -89,9 +90,8 @@ def main(args):
8990

9091
from argparse import ArgumentParser
9192

92-
parser = ArgumentParser(
93-
prog='nth_window_in_workspace.py',
94-
description="""Program to:
93+
parser = ArgumentParser(prog='nth_window_in_workspace.py',
94+
description="""Program to:
9595
* Select the nth window from a workspace. (i.e. for mapping each window to a key)
9696
* Go to workspace, or cycle through the windows of the workspace.
9797
(improvement on just going to the workspace)""")

0 commit comments

Comments
 (0)