-
Notifications
You must be signed in to change notification settings - Fork 0
/
.chezmoi.toml.tmpl
47 lines (42 loc) · 1.41 KB
/
.chezmoi.toml.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{{- $choices := list "home" "work" -}}
{{- $profile := promptChoiceOnce . "profile" "Which profile" $choices -}}
{{- $osid := .chezmoi.os -}}
{{- $subsystem := .chezmoi.os -}}
{{- if and (eq .chezmoi.os "windows") (ne (env "MSYSTEM") "") -}}
{{- $subsystem = "msys2" -}}
{{- else if eq .chezmoi.os "linux" -}}
{{- if hasKey .chezmoi.osRelease "id" -}}
{{- $osid = printf "%s-%s" .chezmoi.os .chezmoi.osRelease.id -}}
{{- end -}}
{{- if (.chezmoi.kernel.osrelease | lower | contains "microsoft") -}}
{{- $subsystem = "wsl" -}}
{{- end -}}
{{- end -}}
[data]
osid = {{ $osid | quote }}
subsystem = {{ $subsystem | quote }}
profile = {{ $profile | quote }}
[edit]
{{ if lookPath "code" -}}
{{- include (joinPath .chezmoi.sourceDir ".chezmoi" "edit.code.toml") -}}
{{- end }}
[diff]
{{ if lookPath "delta" -}}
{{- include (joinPath .chezmoi.sourceDir ".chezmoi" "diff.delta.toml") -}}
{{- else if lookPath "difft" -}}
{{- include (joinPath .chezmoi.sourceDir ".chezmoi" "diff.difft.toml") -}}
{{- end }}
[merge]
{{ if lookPath "meld" -}}
{{- include (joinPath .chezmoi.sourceDir ".chezmoi" "merge.meld.toml") -}}
{{- else if lookPath "code" -}}
{{- include (joinPath .chezmoi.sourceDir ".chezmoi" "merge.code.toml") -}}
{{- end }}
{{ if ne $subsystem "windows" -}}
[interpreters.sh]
command = "bash"
[interpreters.zsh]
command = "zsh"
[interpreters.ps1]
command = "bash"
{{- end }}