From 2ddfbab8757721d65ec169c2a2c1058932e769c4 Mon Sep 17 00:00:00 2001 From: Yuan Chiu Date: Sun, 4 May 2025 15:11:31 +0800 Subject: [PATCH] =?UTF-8?q?feat=20.chezmoi.toml:=20=E6=94=B9=E5=AF=AB=20ch?= =?UTF-8?q?ezmoi=20init=20=E7=9A=84=E9=81=B8=E9=A0=85=E8=A8=AD=E8=A8=88?= =?UTF-8?q?=EF=BC=8C=E6=B7=BB=E5=8A=A0=E8=A8=AD=E5=AE=9A=E7=B5=84=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .chezmoi.toml.tmpl | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/.chezmoi.toml.tmpl b/.chezmoi.toml.tmpl index 8f38334..db183e9 100644 --- a/.chezmoi.toml.tmpl +++ b/.chezmoi.toml.tmpl @@ -1,9 +1,26 @@ {{- $name := promptStringOnce . "name" "請輸入您的姓名" -}} {{- $email := promptStringOnce . "email" "輸入您的Email地址" -}} -{{- $isServer := promptBoolOnce . "isServer" "Does this machine is Server" -}} -{{- $enableSixel := promptBoolOnce . "enableSixel" "Is enable terminal output with sixel" -}} -{{- $enableGUI := promptBoolOnce . "enableGUI" "Does this machine have a GUI" -}} -{{- $enableYcm := promptBoolOnce . "enableYcm" "Is enable Vim YCM compatible (Will use 2.7GB)" -}} + +{{- $hosttype_choices := list "desktop" "server" "manual" -}} +{{- $hosttype := promptChoice "What type of host are you on" $hosttype_choices -}} +{{- $isServer := true -}} +{{- $enableSixel := false -}} +{{- $enableGUI := false -}} +{{- $enableYcm := false -}} + +{{- if eq $hosttype "desktop" -}} +{{- $isServer = false -}} +{{- $enableSixel = true -}} +{{- $enableGUI = true -}} +{{- $enableYcm = true -}} + +{{- else if eq $hosttype "manual" -}} +{{- $isServer = promptBool "Does this machine is Server" -}} +{{- $enableSixel = promptBool "Is enable terminal output with sixel" -}} +{{- $enableGUI = promptBool "Does this machine have a GUI" -}} +{{- $enableYcm = promptBool "Is enable Vim YCM compatible (Will use 2.7GB)" -}} +{{ end -}} + sourceDir = "~/.local/share/chezmoi" [data]