Commit 13f0e505 authored by Jay Ta'ala's avatar Jay Ta'ala
Browse files

Master-stack bindsyms now respect master-stack container layouts

(whatever they may be).
parent 596c0193
...@@ -119,12 +119,13 @@ bindsym $mod+k focus up ...@@ -119,12 +119,13 @@ bindsym $mod+k focus up
bindsym $mod+l focus right bindsym $mod+l focus right
# master-stack keybinding (moves stack window to master and current master back to stack window) # master-stack keybinding (moves stack window to master and current master back to stack window)
bindsym $mod+m exec "i3-msg focus parent, focus right"
bindsym $mod+comma exec "i3-msg focus up, move right, focus up, focus left"
# NOTE: requires jq # NOTE: requires jq
bindsym $mod+Shift+m exec "CURR=$(i3-msg -t get_tree | jq -r 'recurse(.nodes[];.nodes!=null)|select(.nodes[].focused).layout'); i3-msg layout stacked, move left, focus up, focus right, layout $CURR, focus parent, focus left, move right, focus left" set $get_layout $(i3-msg -t get_tree | jq -r 'recurse(.nodes[];.nodes!=null)|select(.nodes[].focused).layout')
bindsym $mod+Shift+n exec "CURR=$(i3-msg -t get_tree | jq -r 'recurse(.nodes[];.nodes!=null)|select(.nodes[].focused).layout'); i3-msg layout stacked, move left, focus up, move right, focus up, layout $CURR, focus parent, focus left" bindsym $mod+m exec "i3-msg focus parent, focus right"
bindsym $mod+Shift+comma exec "i3-msg focus up, focus right; CURR=$(i3-msg -t get_tree | jq -r 'recurse(.nodes[];.nodes!=null)|select(.nodes[].focused).layout'); i3-msg layout stacked, focus left, move right, move up, focus down, layout $CURR, focus parent, focus left" bindsym $mod+comma exec "MST=$get_layout; i3-msg layout stacked, focus up, move right, focus up, focus left, layout $MST"
bindsym $mod+Shift+m exec "STK=$get_layout; i3-msg layout stacked, move left; MST=$get_layout; i3-msg layout stacked, focus up, focus right, layout $STK, focus parent, focus left, move right, focus left, layout $MST"
bindsym $mod+Shift+n exec "STK=$get_layout; i3-msg layout stacked, move left; MST=$get_layout; i3-msg layout stacked, focus up, move right, focus up, layout $STK, focus parent, focus left, layout $MST"
bindsym $mod+Shift+comma exec "MST=$get_layout; i3-msg layout stacked, focus up, focus right; STK=$get_layout; i3-msg layout stacked, focus left, move right, move up, focus down, layout $STK, focus parent, focus left, layout MST"
# container focusing (with fallback for case where window is direct child of workspace container) # container focusing (with fallback for case where window is direct child of workspace container)
# NOTE: requires xdotool # NOTE: requires xdotool
......
...@@ -78,12 +78,13 @@ bindsym $mod+k focus up ...@@ -78,12 +78,13 @@ bindsym $mod+k focus up
bindsym $mod+l focus right bindsym $mod+l focus right
# master-stack keybinding (moves stack window to master and current master back to stack window) # master-stack keybinding (moves stack window to master and current master back to stack window)
bindsym $mod+m exec "i3-msg focus parent, focus right"
bindsym $mod+comma exec "i3-msg focus up, move right, focus up, focus left"
# NOTE: requires jq # NOTE: requires jq
bindsym $mod+Shift+m exec "CURR=$(i3-msg -t get_tree | jq -r 'recurse(.nodes[];.nodes!=null)|select(.nodes[].focused).layout'); i3-msg layout stacked, move left, focus up, focus right, layout $CURR, focus parent, focus left, move right, focus left" set $get_layout $(i3-msg -t get_tree | jq -r 'recurse(.nodes[];.nodes!=null)|select(.nodes[].focused).layout')
bindsym $mod+Shift+n exec "CURR=$(i3-msg -t get_tree | jq -r 'recurse(.nodes[];.nodes!=null)|select(.nodes[].focused).layout'); i3-msg layout stacked, move left, focus up, move right, focus up, layout $CURR, focus parent, focus left" bindsym $mod+m exec "i3-msg focus parent, focus right"
bindsym $mod+Shift+comma exec "i3-msg focus up, focus right; CURR=$(i3-msg -t get_tree | jq -r 'recurse(.nodes[];.nodes!=null)|select(.nodes[].focused).layout'); i3-msg layout stacked, focus left, move right, move up, focus down, layout $CURR, focus parent, focus left" bindsym $mod+comma exec "MST=$get_layout; i3-msg layout stacked, focus up, move right, focus up, focus left, layout $MST"
bindsym $mod+Shift+m exec "STK=$get_layout; i3-msg layout stacked, move left; MST=$get_layout; i3-msg layout stacked, focus up, focus right, layout $STK, focus parent, focus left, move right, focus left, layout $MST"
bindsym $mod+Shift+n exec "STK=$get_layout; i3-msg layout stacked, move left; MST=$get_layout; i3-msg layout stacked, focus up, move right, focus up, layout $STK, focus parent, focus left, layout $MST"
bindsym $mod+Shift+comma exec "MST=$get_layout; i3-msg layout stacked, focus up, focus right; STK=$get_layout; i3-msg layout stacked, focus left, move right, move up, focus down, layout $STK, focus parent, focus left, layout MST"
# move focused window # move focused window
bindsym $mod+Shift+Left move left 100px bindsym $mod+Shift+Left move left 100px
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment