From f220a409358a6e992985df5ab0da0a0b6933a994 Mon Sep 17 00:00:00 2001 From: jay Date: Mon, 27 Feb 2023 00:08:31 +0800 Subject: [PATCH] [feat] add tmux shell autostart option --- .chezmoi.toml.tmpl | 4 ++++ dot_zshrc => dot_zshrc.tmpl | 3 +++ 2 files changed, 7 insertions(+) rename dot_zshrc => dot_zshrc.tmpl (97%) diff --git a/.chezmoi.toml.tmpl b/.chezmoi.toml.tmpl index fdb83d6..e9eb1a7 100644 --- a/.chezmoi.toml.tmpl +++ b/.chezmoi.toml.tmpl @@ -25,6 +25,10 @@ {{- $installGo := promptBool "installGo" true -}} {{- $installNode := promptBool "installNode" true -}} {{- $installRust := promptBool "installRust" true -}} +{{- $enableTmux := promptBool "enableTmux" true -}} + +[data.shell] + tmux = {{ $enableTmux }} [data.gitconfig] email = {{ $email | quote }} diff --git a/dot_zshrc b/dot_zshrc.tmpl similarity index 97% rename from dot_zshrc rename to dot_zshrc.tmpl index b1332af..b94329f 100644 --- a/dot_zshrc +++ b/dot_zshrc.tmpl @@ -1,6 +1,9 @@ +{{ if .shell.tmux }} export ZSH_TMUX_AUTOSTART=true export ZSH_TMUX_AUTOSTART_ONCE=true export ZSH_TMUX_AUTOCONNECT=true +{{ end }} + # install zinit # git clone https://github.com/zdharma-continuum/zinit.git ~/.zinit/bin source ~/.zinit/bin/zinit.zsh