Adjust behavior for closing tmux sessions via keybinds

This commit is contained in:
2025-10-01 15:43:32 -05:00
parent 3ba8b1699c
commit a788324026
4 changed files with 11 additions and 7 deletions

View File

@@ -8,8 +8,8 @@ tmux_omitted_dirs=(
[[ ! ${tmux_omitted_dirs[(re)$(pwd)]} ]] && {
tmux new-window -d -n $EDITOR
tmux send-keys -t :$EDITOR "$EDITOR ." c-M
tmux new-window -d -n debug
tmux new-window -d -n run
tmux new-window -d -n d-oc
tmux new-window -d -n procs
tmux rename-window cmd
tmux send-keys -t :cmd "clear; [[ -d .git ]] && git status" c-M
}

View File

@@ -25,10 +25,9 @@ bind -r l select-pane -R
# reload tmux.conf
bind-key r source-file "$XDG_CONFIG_HOME/tmux/tmux.conf" \; display-message "tmux.conf reloaded"
# kill the current session
# TODO: combine these into one command; must cover case when only 1 session remains
bind-key q rename-session zzzz-temp-kill\; switch-client -p\; kill-session -t zzzz-temp-kill
bind-key w kill-session
# closing the current session
bind-key q kill-session
bind-key w run-shell "$DIR_SCRIPTS/tmux-session-close #{session_name}"
# creating new windows
bind-key n new-window