From ee6d7cd172a42d74db15bff4eca69c1dcbe605b0 Mon Sep 17 00:00:00 2001 From: Heinrich Thaler Date: Tue, 22 Oct 2024 20:55:14 +0200 Subject: [PATCH] tmux attach create session if one does not exist --- .config/tmux/tmux.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index 87ff9d2..8a3f724 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -33,4 +33,7 @@ bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel bind '"' split-window -v -c "#{pane_current_path}" bind % split-window -h -c "#{pane_current_path}" +# if run as "tmux attach", create a session if one does not already exist +new-session -n $HOST + run '~/.tmux/plugins/tpm/tpm'