diff --git a/.chezmoi.toml.tmpl b/.chezmoi.toml.tmpl index cb6b5f4..3ee1291 100644 --- a/.chezmoi.toml.tmpl +++ b/.chezmoi.toml.tmpl @@ -1,7 +1,9 @@ {{- $name := promptStringOnce . "name" "請輸入您的姓名" -}} {{- $email := promptStringOnce . "email" "輸入您的Email地址" -}} +{{- $hasGUI := promptBoolOnce . "hasGUI" "Does this machine have a GUI" -}} sourceDir = "~/.local/share/chezmoi" [data] name = {{ $name | quote }} email = {{ $email | quote }} + noGUI = {{ not $hasGUI }} diff --git a/.chezmoiignore b/.chezmoiignore index 6989dd1..6c1ac1b 100644 --- a/.chezmoiignore +++ b/.chezmoiignore @@ -4,9 +4,23 @@ chezmoi.code-workspace dconf.ini +{{/* ---- 沒有圖形界面 ---------------------------------------------------- */ -}} +{{ if .noGUI }} +.config/iterm2/ +.config/alacritty +.config/neovide +.config/konsolerc +.local/share/konsole +dconf.ini +.gvimrc + +{{/* ---- 有視窗應用程式 -------------------------------------------------- */ -}} +{{ else}} + +{{/* ---- 處理特定os專用 */ -}} {{ if ne .chezmoi.os "darwin" }} .chezmoiscripts/run_onchange_before_darwin-install-packages.sh.tmpl -.config/iterm2/com.googlecode.iterm2.plist +.config/iterm2 {{ end }} {{ if ne .chezmoi.os "linux" }} .chezmoiscripts/run_onchange_before_linux-install-packages.sh.tmpl @@ -19,3 +33,5 @@ dconf.ini {{ else }} *.sh {{ end }} + +{{ end }}