aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--autotiling/main.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/autotiling/main.py b/autotiling/main.py
index c14a6b7..87d0ee0 100644
--- a/autotiling/main.py
+++ b/autotiling/main.py
@@ -123,11 +123,11 @@ def switch_splitting(i3, e, debug, outputs, workspaces, depth_limit, splitwidth,
elif debug:
print("Error: Switch failed with err {}".format(result[0].error), file=sys.stderr, )
- if e.change == "new" and con.percent:
- if con.parent.layout == "splitv": # top / bottom
+ if e.change in ["new","move"] and con.percent:
+ if con.parent.layout == "splitv" and splitheight != 1.0: # top / bottom
# print(f"split top fac {splitheight*100}")
i3.command(f"resize set height {int(con.percent*splitheight*100)} ppt")
- else: # left / right
+ elif con.parent.layout == "splith" and splitwidth != 1.0: # top / bottom: # left / right
# print(f"split right fac {splitwidth*100} ")
i3.command(f"resize set width {int(con.percent*splitwidth*100)} ppt")
@@ -221,8 +221,8 @@ def main():
outputs=args.outputs,
workspaces=args.workspaces,
depth_limit=args.limit,
- splitwidth=args.splitwidth,
- splitheight=args.splitheight,
+ splitwidth=args.splitwidth,
+ splitheight=args.splitheight,
splitratio=args.splitratio
)
i3 = Connection()