diff --git a/chezmoi.roots/_src.all/.chezmoi.toml.tmpl b/chezmoi.roots/_src.all/.chezmoi.toml.tmpl index 9af2c2f..dabf606 100644 --- a/chezmoi.roots/_src.all/.chezmoi.toml.tmpl +++ b/chezmoi.roots/_src.all/.chezmoi.toml.tmpl @@ -1,15 +1,17 @@ # source by .chezmoi.toml.tmpl, it is recommended to edit with # cz edit-config-template && cz init -{{- $githubToken := or ( +{{- $githubToken := get . "githubToken" | default "" -}} +{{- $githubToken = or ( env "CZ_GITHUB_ACCESS_TOKEN" ) ( env "CHEZMOI_GITHUB_ACCESS_TOKEN" ) ( env "GITHUB_ACCESS_TOKEN" ) ( env "GITHUB_TOKEN" - ) ( promptStringOnce . "githubToken" "Public GITHUB token (mostly for rate limits - !insecure!)" + ) ( promptStringOnce . "githubToken" "Public GITHUB token (mostly for rate limits - !insecure!)" $githubToken ) -}} {{- $sysname := promptStringOnce . "sysname" "System name" (or ( - env "CZ_SYSNAME" + get . "sysname" + ) ( env "CZ_SYSNAME" ) ( .chezmoi.hostname )) -}} {{- $sysgroup := promptStringOnce . "sysgroup" "System group" (or ( @@ -30,8 +32,11 @@ ) ( output "sh" "-c" "git config user.name || true" ) ( list .chezmoi.username " (@" $sysname ")" | join "" )) -}} -{{- $promptStyle := get (get . "style" | default .) "prompt" | default "cool" -}} -{{- $promptStyle = promptString "Prompt style (cool/hot/lux)" $promptStyle -}} +{{- $promptStyleChoices := list "cool" "hot" "lux" -}} +{{- $zellijStyleChoices := list "-locked-full" "-locked" "-normal" -}} +{{- $promptStyle := dig "style" "prompt" "cool" . -}} +{{- $promptStyle = promptChoice "Prompt style" $promptStyleChoices $promptStyle -}} +{{- $zellijStyle := promptChoiceOnce . "style.zellij" "Zellij default style" $zellijStyleChoices "-locked-full" -}} {{- $scriptTempDir := or ( get . "sz.os.scriptTempDir" ) ( env "CZ_SCRIPT_TEMPDIR" ) -}} {{- $chassisType := or ( get . "sz.os.chassisType" ) ( env "CZ_CHASSIS" ) -}} @@ -113,6 +118,9 @@ scriptTempDir={{ $scriptTempDir | quote }} {{- if ($promptStyle) }} prompt={{- $promptStyle | quote }} {{- end }} +{{- if ($zellijStyle) }} + zellij={{- $zellijStyle | quote }} +{{- end }} [diff] # command = "nvim" diff --git a/chezmoi.roots/_src.all/private_dot_config/starship.toml.tmpl b/chezmoi.roots/_src.all/private_dot_config/starship.toml.tmpl index b87f702..5a8d32b 100644 --- a/chezmoi.roots/_src.all/private_dot_config/starship.toml.tmpl +++ b/chezmoi.roots/_src.all/private_dot_config/starship.toml.tmpl @@ -1,6 +1,6 @@ # Customized, based on tokyo-night -palette = {{ get (get . "style" | default .) "prompt" | default "cool" | quote }} +palette = {{ dig "style" "prompt" "cool" . | quote }} # global prompt configuration ( https://starship.rs/config/#prompt ) format = """ [░▒▓](fg:gradient_a)\