AutoYADM commit: 2024-12-22 19:15:02
This commit is contained in:
parent
85222145bf
commit
a885dec5c8
3 changed files with 14 additions and 3 deletions
8
.config/tmux/confirm_kill_pane.sh
Executable file
8
.config/tmux/confirm_kill_pane.sh
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Function to check if killing the pane would kill the session
|
||||
if [ "$(tmux list-panes -F '#{pane_id}' | wc -l)" -eq 1 ]; then
|
||||
tmux confirm-before -p "Kill window? (y/n): " "kill-pane"
|
||||
else
|
||||
tmux kill-pane
|
||||
fi
|
|
@ -4,7 +4,6 @@ set -g xterm-keys on
|
|||
set -g allow-rename off
|
||||
set -s escape-time 1
|
||||
|
||||
|
||||
# For image.nvim
|
||||
set -gq allow-passthrough on
|
||||
set -g visual-activity off
|
||||
|
@ -57,12 +56,16 @@ bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
|
|||
|
||||
bind-key b set-option status
|
||||
|
||||
# Do not preserve the current working directory for new windows
|
||||
bind c new-window -c ""
|
||||
|
||||
# Swap the split bindings to be consistent with nvim
|
||||
bind -n M-v split-window -h -c "#{pane_current_path}"
|
||||
bind -n M-s split-window -v -c "#{pane_current_path}"
|
||||
|
||||
bind x kill-window
|
||||
bind -n M-x killp
|
||||
# bind -n M-x killp
|
||||
bind -n M-x run-shell "~/.config/tmux/confirm_kill_pane.sh; true"
|
||||
bind -n M-f resize-pane -Z
|
||||
bind - copy-mode
|
||||
bind -n M-u next-window
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue