Activate/focus original window after feed reset

windows_testing_volume
Tyler Goodlet 2021-09-30 12:10:01 -04:00
parent ceb1152f2c
commit 1ad7e9bae2
1 changed files with 9 additions and 0 deletions

View File

@ -25,6 +25,8 @@ import i3ipc
i3 = i3ipc.Connection()
t = i3.get_tree()
orig_win_id = t.find_focused().window
# for tws
win_names: list[str] = [
'Interactive Brokers', # tws running in i3
@ -59,3 +61,10 @@ for name in win_names:
# hackzorzes
'key', 'ctrl+alt+f',
])
# re-activate and focus original window
subprocess.call([
'xdotool',
'windowactivate', '--sync', str(orig_win_id),
'click', '--window', str(orig_win_id), '1',
])