Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Jay Ta'ala
jt-config-repo
Commits
950cbe7d
Commit
950cbe7d
authored
Nov 06, 2021
by
Jay Ta'ala
Browse files
Added wasd keys similar to hjkl.
parent
24a68456
Changes
1
Show whitespace changes
Inline
Side-by-side
i3/config
View file @
950cbe7d
...
@@ -138,20 +138,28 @@ bindsym $mod+j focus down
...
@@ -138,20 +138,28 @@ bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+k focus up
bindsym $mod+l focus right
bindsym $mod+l focus right
# wasd focus
bindsym $mod+w focus up
bindsym $mod+a focus left
bindsym $mod+s focus down
bindsym $mod+d 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)
# NOTE: requires 'jq'
# NOTE: requires 'jq'
bindsym $mod+period focus parent, focus right, focus child
#
bindsym $mod+period focus parent, focus right, focus child
bindsym $mod+comma focus parent, focus left, focus child
#
bindsym $mod+comma focus parent, focus left, focus child
set $get_layout $(i3-msg -t get_tree | jq -r 'recurse(.nodes[];.nodes!=null)|select(.nodes[].focused).layout')
#
set $get_layout $(i3-msg -t get_tree | jq -r 'recurse(.nodes[];.nodes!=null)|select(.nodes[].focused).layout')
set $count_children $(i3-msg -t get_tree | jq -r 'recurse(.nodes[];.nodes!=null)|select(.nodes[].focused).nodes' | jq length)
#
set $count_children $(i3-msg -t get_tree | jq -r 'recurse(.nodes[];.nodes!=null)|select(.nodes[].focused).nodes' | jq length)
bindsym $mod+Shift+period exec "COUNT=$count_children; if [ \\"$COUNT\\" -gt 1 ]; then MST=$get_layout; i3-msg layout stacked, focus right; STK=$get_layout; i3-msg layout stacked, focus left, move right, layout $STK, focus parent, focus left, layout $MST; fi"
#
bindsym $mod+Shift+period exec "COUNT=$count_children; if [ \\"$COUNT\\" -gt 1 ]; then MST=$get_layout; i3-msg layout stacked, focus right; STK=$get_layout; i3-msg layout stacked, focus left, move right, layout $STK, focus parent, focus left, layout $MST; fi"
bindsym $mod+Shift+comma exec "COUNT=$count_children; if [ \\"$COUNT\\" -gt 1 ]; then STK=$get_layout; i3-msg layout stacked, focus left; MST=$get_layout; i3-msg layout stacked, focus right, move left, layout $MST, focus parent, focus right, layout $STK; fi"
#
bindsym $mod+Shift+comma exec "COUNT=$count_children; if [ \\"$COUNT\\" -gt 1 ]; then STK=$get_layout; i3-msg layout stacked, focus left; MST=$get_layout; i3-msg layout stacked, focus right, move left, layout $MST, focus parent, focus right, layout $STK; fi"
bindsym $mod_next+Shift+period exec "COUNT=$count_children; if [ \\"$COUNT\\" -gt 1 ]; then MST=$get_layout; i3-msg layout stacked, focus right; STK=$get_layout; i3-msg layout stacked, focus left, move right, focus up, layout $STK, focus parent, focus left, layout $MST; fi"
#
bindsym $mod_next+Shift+period exec "COUNT=$count_children; if [ \\"$COUNT\\" -gt 1 ]; then MST=$get_layout; i3-msg layout stacked, focus right; STK=$get_layout; i3-msg layout stacked, focus left, move right, focus up, layout $STK, focus parent, focus left, layout $MST; fi"
bindsym $mod_next+Shift+comma exec "COUNT=$count_children; if [ \\"$COUNT\\" -gt 1 ]; then STK=$get_layout; i3-msg layout stacked, focus left; MST=$get_layout; i3-msg layout stacked, focus right, move left, focus up, layout $MST, focus parent, focus right, layout $STK; fi"
#
bindsym $mod_next+Shift+comma exec "COUNT=$count_children; if [ \\"$COUNT\\" -gt 1 ]; then STK=$get_layout; i3-msg layout stacked, focus left; MST=$get_layout; i3-msg layout stacked, focus right, move left, focus up, layout $MST, focus parent, focus right, layout $STK; fi"
# simple master-stack moving
# simple master-stack moving
#bindsym $mod+Shift+comma move left, focus right
bindsym $mod+z move left
#bindsym $mod+Shift+period move right, focus left
bindsym $mod+Shift+z move left, focus right
bindsym $mod+x move right
bindsym $mod+Shift+x move right, focus left
# 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
...
@@ -170,6 +178,12 @@ bindsym $mod+Shift+j move down 100px
...
@@ -170,6 +178,12 @@ bindsym $mod+Shift+j move down 100px
bindsym $mod+Shift+k move up 100px
bindsym $mod+Shift+k move up 100px
bindsym $mod+Shift+l move right 100px
bindsym $mod+Shift+l move right 100px
# wasd move
bindsym $mod+Shift+w move up 100px
bindsym $mod+Shift+a move left 100px
bindsym $mod+Shift+s move down 100px
bindsym $mod+Shift+d move right 100px
# mark and focus
# mark and focus
bindsym $mod+Ctrl+1 mark --add --toggle 1
bindsym $mod+Ctrl+1 mark --add --toggle 1
bindsym $mod+Ctrl+2 mark --add --toggle 2
bindsym $mod+Ctrl+2 mark --add --toggle 2
...
@@ -191,10 +205,10 @@ bindsym $mod+slash exec "i3-input -f $i3inputfont -P \\"Change Title: \\" -F 'ti
...
@@ -191,10 +205,10 @@ bindsym $mod+slash exec "i3-input -f $i3inputfont -P \\"Change Title: \\" -F 'ti
bindsym $mod+$mod_next+slash title_format " %title"
bindsym $mod+$mod_next+slash title_format " %title"
# container layouts
# container layouts
bindsym $mod+w layout tabbed
bindsym $mod
_next
+w layout tabbed
bindsym $mod+q layout splith
bindsym $mod
_next
+q layout splith
bindsym $mod+e layout splitv
bindsym $mod
_next
+e layout splitv
bindsym $mod+s layout stacking
bindsym $mod
_next
+s layout stacking
# child container layout bindsyms (creates a child container from currently select window)
# child container layout bindsyms (creates a child container from currently select window)
bindsym $mod+$mod_next+q split h
bindsym $mod+$mod_next+q split h
...
@@ -236,8 +250,8 @@ bindsym $mod+$mod_next+d exec xprop -id $(xdotool getactivewindow) -f INVERT_FLA
...
@@ -236,8 +250,8 @@ bindsym $mod+$mod_next+d exec xprop -id $(xdotool getactivewindow) -f INVERT_FLA
bindsym $mod+$mod_next+Shift+d exec xprop -id $(xdotool getactivewindow) -remove INVERT_FLAG; exec notify-send 'invert removed on window'
bindsym $mod+$mod_next+Shift+d exec xprop -id $(xdotool getactivewindow) -remove INVERT_FLAG; exec notify-send 'invert removed on window'
# focus the parent container
# focus the parent container
bindsym $mod+
a
focus parent
bindsym $mod+
q
focus parent
bindsym $mod+
z
focus child
bindsym $mod+
e
focus child
# move the currently focused window to the scratchpad
# move the currently focused window to the scratchpad
bindsym $mod+Shift+Tab move scratchpad
bindsym $mod+Shift+Tab move scratchpad
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment