From 39441561686deb51970468166ad43c296ecd7930 Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Mon, 22 May 2023 14:47:48 +0200 Subject: [PATCH] tmux: Replace selfinsert.sh with a command-prompt --- .config/tmux/tmux.conf | 16 +++------------- .config/tmux/tmux_selfinsert.sh | 8 -------- 2 files changed, 3 insertions(+), 21 deletions(-) delete mode 100755 .config/tmux/tmux_selfinsert.sh diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index 2e43357..4ae6275 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -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 `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" diff --git a/.config/tmux/tmux_selfinsert.sh b/.config/tmux/tmux_selfinsert.sh deleted file mode 100755 index d5b3362..0000000 --- a/.config/tmux/tmux_selfinsert.sh +++ /dev/null @@ -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