aboutsummaryrefslogtreecommitdiffstats
path: root/autotiling.py
diff options
context:
space:
mode:
Diffstat (limited to 'autotiling.py')
-rwxr-xr-xautotiling.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/autotiling.py b/autotiling.py
index 9cd6aa5..2f2fb6b 100755
--- a/autotiling.py
+++ b/autotiling.py
@@ -39,7 +39,8 @@ def switch_splitting(i3, e):
# Let's exclude floating containers, stacked layouts, tabbed layouts and full screen mode
if not is_floating and not is_stacked and not is_tabbed and not is_full_screen:
new_layout = 'splitv' if con.rect.height > con.rect.width else 'splith'
- i3.command(new_layout)
+ if new_layout != con.parent.layout:
+ i3.command(new_layout)
except Exception as e:
print('Error: {}'.format(e))