From d727b642e538befb5d5388af6e87fddab1727e28 Mon Sep 17 00:00:00 2001 From: inkch Date: Fri, 19 Jan 2024 16:11:30 +0900 Subject: [PATCH] fish: auto attach or create tmux session named "default" --- dot_config/private_fish/config.fish.tmpl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dot_config/private_fish/config.fish.tmpl b/dot_config/private_fish/config.fish.tmpl index e266d37..cfd0996 100644 --- a/dot_config/private_fish/config.fish.tmpl +++ b/dot_config/private_fish/config.fish.tmpl @@ -12,6 +12,10 @@ if status --is-interactive set -q fish_private_mode && set -x FISH_IS_IN_PRIVATE 1 command -v zoxide > /dev/null && zoxide init fish | source command -v starship > /dev/null && starship init fish | source + + if type -q tmux; and test -z "$TMUX" + tmux attach -t default || tmux new-session -s default + end end {{- if (and (eq .chezmoi.os "linux") (eq .hosttype "desktop" "laptop")) }}