Skip to content

Commit

Permalink
move default_layout initial assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladimir-csp authored Mar 11, 2024
1 parent fba47de commit 65e6faf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions layout-per-window.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def on_window(ipc: i3ipc.connection.Connection, event: i3ipc.events.WindowEvent)


if __name__ == "__main__":
default_layout: int = None
if len(sys.argv) == 2:
if sys.argv[1].isnumeric():
default_layout = int(sys.argv[1])
Expand All @@ -62,8 +63,6 @@ def on_window(ipc: i3ipc.connection.Connection, event: i3ipc.events.WindowEvent)
elif len(sys.argv) > 2:
print("Too many arguments", file=sys.stderr)
sys.exit(2)
else:
default_layout: int = None

ipc = i3ipc.Connection()
focused = ipc.get_tree().find_focused()
Expand Down

0 comments on commit 65e6faf

Please sign in to comment.