tmux: Fix selfinsert key-table
Some keys were missing from the key-table (e.g. C-[hjkl]) as they were set later in the config. Fix by moving the script execution to the bottom of the config.
This commit is contained in:
@@ -112,16 +112,7 @@ bind -T resize 4 selectl main-vertical \; switchc -T resize
|
|||||||
bind -T resize 5 selectl tiled \; switchc -T resize
|
bind -T resize 5 selectl tiled \; switchc -T resize
|
||||||
bind r switchc -T resize
|
bind r switchc -T resize
|
||||||
|
|
||||||
# Create a key-table which self-inserts all keys that are bound in the root key
|
# Switch to selfinsert key-table. See execution of tmux_selfinsert.sh below
|
||||||
# table. (C-h for example is sometimes needed as backspace sequence)
|
|
||||||
#
|
|
||||||
# tmux_selfinsert.sh:
|
|
||||||
#
|
|
||||||
# tmux list-keys -T root | awk '{print $4}' | while read key; do
|
|
||||||
# tmux bind -r -T selfinsert "$key" send
|
|
||||||
# done
|
|
||||||
|
|
||||||
run-shell -b "$XDG_CONFIG_HOME/tmux/tmux_selfinsert.sh"
|
|
||||||
bind C-v switchc -T selfinsert
|
bind C-v switchc -T selfinsert
|
||||||
|
|
||||||
# Synchronize the panes in the current window with `<prefix>S`
|
# Synchronize the panes in the current window with `<prefix>S`
|
||||||
@@ -203,5 +194,16 @@ set -g window-status-current-format \
|
|||||||
set -g window-status-format \
|
set -g window-status-format \
|
||||||
"#[fg=#{@ui_color}]#{?window_zoomed_flag,#[underscore],}#I #W"
|
"#[fg=#{@ui_color}]#{?window_zoomed_flag,#[underscore],}#I #W"
|
||||||
|
|
||||||
|
# Create a key-table which self-inserts all keys that are bound in the root key
|
||||||
|
# table. (C-h for example is sometimes needed as backspace sequence)
|
||||||
|
# NOTE: This should stay at they very bottom after all keybindings were set
|
||||||
|
#
|
||||||
|
# tmux_selfinsert.sh:
|
||||||
|
#
|
||||||
|
# tmux list-keys -T root | awk '{print $4}' | while read key; do
|
||||||
|
# tmux bind -r -T selfinsert "$key" send
|
||||||
|
# done
|
||||||
|
run-shell -b "$XDG_CONFIG_HOME/tmux/tmux_selfinsert.sh"
|
||||||
|
|
||||||
# Initialize TMUX plugin manager. Keep this line at the very bottom.
|
# Initialize TMUX plugin manager. Keep this line at the very bottom.
|
||||||
run -b "$XDG_CONFIG_HOME/tmux/plugins/tpm/tpm"
|
run -b "$XDG_CONFIG_HOME/tmux/plugins/tpm/tpm"
|
||||||
|
|||||||
Reference in New Issue
Block a user