mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-06-25 11:18:33 +02:00
i3-companion: remove autosplit
Not sure if this is really useful. When windows become too small, it would be smarter to have something different.
This commit is contained in:
parent
a77a5e27ce
commit
d2e9eb6aa3
1 changed files with 0 additions and 19 deletions
|
@ -107,22 +107,6 @@ def workspace_rename(i3, event):
|
||||||
i3.command(';'.join(commands))
|
i3.command(';'.join(commands))
|
||||||
|
|
||||||
|
|
||||||
def autosplit(i3, event):
|
|
||||||
"""Split on shortest side."""
|
|
||||||
window = event.container
|
|
||||||
if not window.rect:
|
|
||||||
return
|
|
||||||
if window.layout in {'stacked', 'tabbed'}:
|
|
||||||
return
|
|
||||||
height = window.rect.height
|
|
||||||
width = window.rect.width
|
|
||||||
if height > width:
|
|
||||||
layout = 'vertical'
|
|
||||||
else:
|
|
||||||
layout = 'horizontal'
|
|
||||||
window.command(f"split {layout}")
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
options = parse_args()
|
options = parse_args()
|
||||||
setup_logging(options)
|
setup_logging(options)
|
||||||
|
@ -136,9 +120,6 @@ if __name__ == "__main__":
|
||||||
Event.WINDOW_CLOSE}:
|
Event.WINDOW_CLOSE}:
|
||||||
i3.on(event, workspace_rename)
|
i3.on(event, workspace_rename)
|
||||||
|
|
||||||
# Autosplit
|
|
||||||
i3.on(Event.WINDOW_FOCUS, autosplit)
|
|
||||||
|
|
||||||
i3.main()
|
i3.main()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.exception("%s", e)
|
logger.exception("%s", e)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue