From cab360ecf7009e766baf876be33919e9fedde72c Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Fri, 30 Aug 2024 17:36:29 +0200 Subject: [PATCH] tmux: Require confirmation before killing a pane It happened to me multiple times that I closed a pane without actually wanting it via a (too) quick . Activate remain-on-exit so that I have to press twice before the pane is actually killed. Dead panes can be recovered with `respawn-pane`. Will see how this goes - could be annoying. --- .config/tmux/tmux.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index aa8889b..c28286e 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -249,6 +249,10 @@ bind -r C-v command-prompt -k -p (selfinsert) { send "%%" } # Synchronize the panes in the current window with `S` bind S set -w synchronize-panes +# Require confirmation before killing a pane +set -g remain-on-exit on +bind -n C-d if -F "#{pane_dead}" { kill-pane } { send } + # Change installation location of plugins setenv -g TMUX_PLUGIN_MANAGER_PATH "$XDG_CONFIG_HOME/tmux/plugins/"