diff options
author | Piotr Miller <nwg.piotr@gmail.com> | 2020-02-19 09:22:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-19 09:22:30 +0100 |
commit | bb3f445b82b64fc8c84e13a33c782011077066cf (patch) | |
tree | 8562b3b208921eb5202a5b5a884d50b7c14c4822 | |
parent | c938782b0fb15595cafc13ba47e23cb0a5a6943c (diff) | |
parent | 8dd3fb713a2a029067d19ee29b9c6ef3dc7fa2cf (diff) | |
download | autotiling-bb3f445b82b64fc8c84e13a33c782011077066cf.tar.gz |
Merge pull request #3 from ammgws/kaizen
Only run command if absolutely necessary
-rwxr-xr-x | autotiling.py | 3 |
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)) |