Add ib gateway support, loop through names
parent
a114329ad9
commit
980a6dde05
|
@ -26,9 +26,16 @@ i3 = i3ipc.Connection()
|
||||||
t = i3.get_tree()
|
t = i3.get_tree()
|
||||||
|
|
||||||
# for tws
|
# for tws
|
||||||
win_name = 'Interactive Brokers' # what for gw tho?
|
win_names: list[str] = [
|
||||||
con = t.find_named(win_name)[0]
|
'Interactive Brokers', # tws running in i3
|
||||||
|
'IB Gateway.', # gw running in i3
|
||||||
|
]
|
||||||
|
|
||||||
|
for name in win_names:
|
||||||
|
results = t.find_named(name)
|
||||||
|
if results:
|
||||||
|
con = results[0]
|
||||||
|
print(f'Resetting data feed for {name}')
|
||||||
win_id = str(con.window)
|
win_id = str(con.window)
|
||||||
w, h = con.rect.width, con.rect.height
|
w, h = con.rect.width, con.rect.height
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue