-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.chezmoi.yaml.tmpl
90 lines (75 loc) · 1.92 KB
/
.chezmoi.yaml.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
{{/* boolean feature tags */}}
{{- $work := false -}}{{/* true if this machine is a work machine */}}
{{- $personal := false -}}{{/* true if this machine should have personal secrets */}}
{{- $linux := false -}}
{{- $windows := false -}}
{{- $wsl := false -}}
{{- $android := false -}}
{{- $hostname := .chezmoi.hostname -}}
{{- if ($hostname | lower | contains "vancanh-ng") -}}
{{- $work = true -}}
{{- else if ($hostname | lower | contains "lenovo") -}}
{{- $personal = true -}}
{{- end -}}
{{- $email := "[email protected]" -}}
{{- if $work -}}
{{- $email = "[email protected]" -}}
{{- end -}}
{{- $shell := "pwsh" -}}
{{- if $work -}}
{{- $shell = "powershell" -}}
{{- end -}}
{{- if eq .chezmoi.os "linux" -}}
{{- $linux = true -}}
{{- end -}}
{{- if eq .chezmoi.os "android" -}}
{{- $android = true -}}
{{- $linux = true -}}
{{- end -}}
{{- if eq .chezmoi.os "windows" -}}
{{- $windows = true -}}
{{- end -}}
{{- if and (eq .chezmoi.os "linux") (.chezmoi.kernel.osrelease | lower | contains "microsoft") -}}
{{- $wsl = true -}}
{{- end -}}
format: "yaml"
progress: true
edit:
apply: true
watch: true
git:
autoCommit: true
autoPush: false
diff:
{{- if $work }}
pager: "cat"
{{- else }}
pager: "delta"
command: "delta"
{{- end }}
reverse: true
merge:
command: "nvim"
args:
- "-d"
- "{{ "{{" }} .Destination {{ "}}" }}"
- "{{ "{{" }} .Source {{ "}}" }}"
- "{{ "{{" }} .Target {{ "}}" }}"
data:
wsl: {{ $wsl }}
linux: {{ $linux }}
windows: {{ $windows }}
android: {{ $android }}
work: {{ $work }}
personal: {{ $personal }}
email: {{ $email | quote }}
defaultShell: {{ $shell | quote }}
scale: {{ if $work -}} 2 {{- else -}} 1.25 {{- end}}
screenWidth: {{ if $work -}} 2880 {{- else -}} 1920 {{- end}}
screenHeight: {{ if $work -}} 1800 {{- else -}} 1080 {{- end}}
fontSize: 13
barHeight: 40
{{- if $windows }}
cd:
command: {{ $shell | quote }}
{{- end }}