Skip to content

Commit

Permalink
Fix linting error
Browse files Browse the repository at this point in the history
  • Loading branch information
OctopusET committed Jan 20, 2024
1 parent 8b0ff88 commit 37093ef
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions layout-per-window.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import i3ipc


def on_window_focus(ipc: i3ipc.connection.Connection, event: i3ipc.events.WindowEvent):
global windows, prev_focused

Expand All @@ -19,7 +20,7 @@ def on_window_focus(ipc: i3ipc.connection.Connection, event: i3ipc.events.Window
if event.container.id in windows:
for (kdb_id, layout_index) in windows[event.container.id].items():
if layout_index != layouts[kdb_id]:
ipc.command(f"input \"{kdb_id}\" xkb_switch_layout {layout_index}")
ipc.command(f'input "{kdb_id}" xkb_switch_layout {layout_index}')
break

prev_focused = event.container.id
Expand All @@ -42,7 +43,7 @@ def on_window(ipc: i3ipc.connection.Connection, event: i3ipc.events.WindowEvent)
prev_focused = focused.id
else:
prev_focused = None
windows = {}
windows = {} # type: dict

ipc.on("window", on_window)
ipc.main()

0 comments on commit 37093ef

Please sign in to comment.