tmux: Replace selfinsert.sh with a command-prompt

This commit is contained in:
2023-05-22 14:47:48 +02:00
parent 33be2cf3be
commit 3944156168
2 changed files with 3 additions and 21 deletions

View File

@@ -118,8 +118,9 @@ bind -T resize 4 selectl main-vertical \; switchc -T resize
bind -T resize 5 selectl tiled \; switchc -T resize
bind r switchc -T resize
# Switch to selfinsert key-table. See execution of tmux_selfinsert.sh below
bind C-v switchc -T selfinsert
# Make it possible to send keys that are bound in the root key table. (C-h for
# example is sometimes needed as backspace sequence)
bind C-v command-prompt -k -p (selfinsert) { send "%%" }
# Synchronize the panes in the current window with `<prefix>S`
bind S set -w synchronize-panes
@@ -203,16 +204,5 @@ set -g window-status-format \
"#[fg=#{@ui_color}]"$window_status
setenv -ghu window_status
# 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"

View File

@@ -1,8 +0,0 @@
#!/bin/sh
#
# 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 list-keys -T root | awk '{print $4}' | while read key; do
tmux bind -r -T selfinsert "$key" send
done