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:
2023-05-22 13:20:51 +02:00
parent 0a95d86e25
commit 1a9780925a

View File

@@ -112,16 +112,7 @@ bind -T resize 4 selectl main-vertical \; switchc -T resize
bind -T resize 5 selectl tiled \; switchc -T resize
bind r switchc -T resize
# 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)
#
# 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"
# Switch to selfinsert key-table. See execution of tmux_selfinsert.sh below
bind C-v switchc -T selfinsert
# 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 \
"#[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.
run -b "$XDG_CONFIG_HOME/tmux/plugins/tpm/tpm"