From c3730b43b7e940f9fcd35a09c7e73e07b68186c4 Mon Sep 17 00:00:00 2001 From: Yuan Chiu Date: Fri, 2 May 2025 12:32:58 +0800 Subject: [PATCH] =?UTF-8?q?chezmoi=20noGUI=E6=9E=B6=E6=A7=8B=E6=95=B4?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .chezmoi.toml.tmpl | 2 ++ .chezmoiignore | 18 +++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) 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 }}