mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-06-28 04:20:03 +02:00
i3-companion: tentative to hanle OnlyOffice stealing focus
This commit is contained in:
parent
a2f2c410d3
commit
c79fe3efb9
1 changed files with 20 additions and 14 deletions
|
@ -560,6 +560,7 @@ async def quake_console(i3, event):
|
||||||
term = quake_window.result()
|
term = quake_window.result()
|
||||||
await term.command("move window to scratchpad")
|
await term.command("move window to scratchpad")
|
||||||
|
|
||||||
|
if term in tree.scratchpad().descendants():
|
||||||
workspaces = await i3.get_workspaces()
|
workspaces = await i3.get_workspaces()
|
||||||
workspace = [ws for ws in workspaces if ws.focused][0]
|
workspace = [ws for ws in workspaces if ws.focused][0]
|
||||||
ws_x, ws_y = workspace.rect.x, workspace.rect.y
|
ws_x, ws_y = workspace.rect.x, workspace.rect.y
|
||||||
|
@ -570,9 +571,14 @@ async def quake_console(i3, event):
|
||||||
"border none,"
|
"border none,"
|
||||||
f"resize set {ws_width} px {height} px,"
|
f"resize set {ws_width} px {height} px,"
|
||||||
"scratchpad show,"
|
"scratchpad show,"
|
||||||
f"move absolute position {ws_x}px {ws_y}px"
|
f"move absolute position {ws_x}px {ws_y}px,"
|
||||||
|
"focus"
|
||||||
)
|
)
|
||||||
logger.debug("QuakeConsole: %s", command)
|
logger.debug("QuakeConsole (show): %s", command)
|
||||||
|
await i3.command(command)
|
||||||
|
else:
|
||||||
|
command = f"[instance={term_name}] scratchpad show"
|
||||||
|
logger.debug("QuakeConsole (hide): %s", command)
|
||||||
await i3.command(command)
|
await i3.command(command)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue