Adjust behavior for closing tmux sessions via keybinds
This commit is contained in:
5
src_files/.local/scripts/tmux-session-close
Executable file
5
src_files/.local/scripts/tmux-session-close
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/zsh
|
||||
|
||||
tmux_existing_sessions=$(tmux list-sessions 2> /dev/null)
|
||||
[[ ${#tmux_existing_sessions[@]} -gt 1 ]] && $DIR_SCRIPTS/tmux-session-init hub
|
||||
tmux kill-session -t $1
|
@@ -10,7 +10,7 @@ tmux_hydrate() {
|
||||
[[ -f $tmux_hydrate_path ]] && tmux send-keys -t $1 "source $tmux_hydrate_path" c-M
|
||||
}
|
||||
|
||||
tmux_existing_sessions=$([[ -n $(pgrep tmux) ]] && tmux list-sessions || echo '')
|
||||
tmux_existing_sessions=$(tmux list-sessions 2> /dev/null || echo '')
|
||||
tmux_search_dirs=(
|
||||
$DIR_HOME_BOX
|
||||
$DIR_DEV
|
||||
|
Reference in New Issue
Block a user