diff --git a/home/user/.config/tmux/aliases.conf b/home/user/.config/tmux/aliases.conf index 5e5572f..1e2bc1c 100644 --- a/home/user/.config/tmux/aliases.conf +++ b/home/user/.config/tmux/aliases.conf @@ -1,4 +1,4 @@ # vim: ft=tmux -set -g command-alias[100] kill='kill-session -t' -set -g command-alias[101] k='kill-session -t' \ No newline at end of file +set -ga command-alias kill='kill-session -t' +set -ga command-alias k='kill-session -t' \ No newline at end of file diff --git a/home/user/.config/tmux/mappings.conf b/home/user/.config/tmux/mappings.conf index 85b6379..0ddbe74 100644 --- a/home/user/.config/tmux/mappings.conf +++ b/home/user/.config/tmux/mappings.conf @@ -29,7 +29,11 @@ bind n command-prompt -p "New session:" "new-session -A -d -s '%1' -c ~ \; switc # Kill session and reattach to last session -bind k confirm-before -p "kill current session? (y/n)" "switch-client -l \; kill-session -t '#S'" +bind x confirm-before -p "kill current session? (y/n)" "switch-client -l \; kill-session -t '#S'" +bind k confirm-before -p "kill current pane? (y/n)" "kill-pane" + +# Kill last session +bind X confirm-before -p "kill last session? (y/n)" "kill-session -t '#{client_last_session}'" # SSH Session