X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;ds=sidebyside;f=i3-set-layout;fp=i3-set-layout;h=6e28c717fdb5444e10de445d6603f52daccfc150;hb=7ed3b98c4d3678d982c33741f1f42727144e66ce;hp=fc6866668a2480e7282046a9b12c318d8618b6ca;hpb=dab96f8fa4c701db13ba734fa0c07b5d12fc8fae;p=distro-setup diff --git a/i3-set-layout b/i3-set-layout index fc68666..6e28c71 100755 --- a/i3-set-layout +++ b/i3-set-layout @@ -29,6 +29,8 @@ def set_layout(i3): """ win = i3.get_tree().find_focused() + # i don't use gp: todo: revert to original alternating_layout function + # which did not return gp. parent, gp = find_parent(i3, win.id) @@ -46,7 +48,7 @@ def set_layout(i3): # instead of what we want. And in fact, the whole logic below is # incorrect and based on testing which did not realize that fact. # - if (parent and gp and len(parent.nodes) == 1): + if (parent and parent.type == 'con' and len(parent.nodes) == 1): # https://unix.stackexchange.com/questions/173754/how-to-move-a-window-up-to-the-level-of-its-parent-window-in-i3wm i3.command('mark i3ha') i3.command('focus parent')