-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.chezmoi.toml.tmpl
143 lines (127 loc) · 4 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
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
{{- /*
vim:ft=toml.gotexttmpl
*/ -}}
# Detect GUI Session Type
{{ if eq .chezmoi.os "linux" }}
[data.session]
type = {{ env "XDG_SESSION_TYPE" | quote }}
wsl = {{ (and (eq .chezmoi.os "linux") (.chezmoi.kernel.osrelease | lower | contains "microsoft")) }}
{{ else if eq .chezmoi.os "darwin" }}
[data.session]
type = "darwin"
wsl = false
{{ end }}
# Detect Desktop OR Laptop. And OS Theme
{{ $osTheme := "dark" }}
{{ $chassisType := "desktop" }}
{{ if eq .chezmoi.os "darwin" }}
{{ $osTheme = ((output "defaults" "read" "-g" "AppleInterfaceStyle") | trimSuffix "\n" | default "light") | lower }}
{{ if contains "MacBook" (output "sysctl" "-n" "hw.model") }}
{{ $chassisType = "laptop" }}
{{ else }}
{{ $chassisType = "desktop" }}
{{ end }}
{{ else if eq .chezmoi.os "linux" }}
{{ if lookPath "hostnamectl" }}
{{ $chassisType = (output "hostnamectl" "--json=short" | mustFromJson).Chassis }}
{{ end }}
{{ else if eq .chezmoi.os "windows" }}
{{ $chassisType = (output "powershell.exe" "-NoProfile" "-NonInteractive" "-Command" "if ((Get-CimInstance -Class Win32_Battery | Measure-Object).Count -gt 0) { Write-Output 'laptop' } else { Write-Output 'desktop' }") | trim }}
{{ end }}
# Boring with some questions
{{ if eq .chezmoi.username "root" }}
{{ $sudoAccess := true }}
{{ else }}
{{ $sudoAccess := promptBool "Do you have sudo access?" false }}
{{ end }}
{{ $privateComputer := promptBool "Is this private computer" true }}
{{ $uname := promptStringOnce . "Full Name" "What is your full name" "fubar" }}
{{ $email := promptStringOnce . "email" "What is your email address" "[email protected]" }}
{{ $dev := promptBool "Is this DEV workstation" false }}
{{ $devops := promptBool "Is this DevOps workstation" false }}
{{ $embedded := promptBool "Is this Embedded DEV workstation" false }}
{{ $media := promptBool "Do you require basic tools for media manipulation" false }}
{{ $deck := promptBool "Do you require TUI presentation tools" false }}
{{ $ads := promptBool "Do you want to block ads" false }}
{{ $tabs := promptInt "Configure default tabs width" 2 }}
{{ $opacity := promptString "Windows opacity" "1.0" }}
{{ $shellPath := promptString "Path to shell" "/bin/zsh" }}
[data]
email = {{ $email | quote }}
uname = {{ $uname | quote }}
[data.tags]
dev = {{ $dev }}
devops = {{ $devops }}
embedded = {{ $embedded }}
media = {{ $media }}
deck = {{ $deck }}
ads = {{ $ads }}
# [data.tags]
# private = {{ $privateComputer }}
# core = true
# dev = false
# devops = false
# esp = false
# media = false
# adblock = false
# laptop = false
# books = false
# news = false
# torrent = false
# tor = false
[data.arch]
{{ if eq .chezmoi.arch "amd64" }}
opt1 = "{{ .chezmoi.arch }}"
opt2 = "x86_64"
{{ else if eq .chezmoi.arch "arm64" }}
opt1 = "{{ .chezmoi.arch }}"
opt2 = "aarch64"
{{ end }}
[data.zsh.pluginsList]
zsh-syntax-highlighting = "zsh-users"
zsh-autosuggestions = "zsh-users"
[data.shell.completionsList]
# starship = "init "
chezmoi = "completion "
limactl = "completion "
kubectl = "completion "
zoxide = "init "
direnv = "hook "
fzf = "--"
[data.tui]
shellPath = {{ $shellPath | quote }}
tabs = {{ $tabs }}
osTheme = {{ $osTheme | quote }}
{{ if ($osTheme | contains "dark") }}
theme = "catppuccin"
themeVariant = "mocha"
{{ else }}
theme = "catppuccin"
themeVariant = "latte"
{{ end }}
[data.gui]
{{ if eq .chezmoi.os "darwin" }}
fontDir = {{ (joinPath .chezmoi.homeDir "Library/Fonts") | quote }}
{{ else if eq .chezmoi.os "linux" }}
fontDir = {{ (joinPath .chezmoi.homeDir ".local/share/fonts") | quote }}
{{ end }}
[data.terminal]
fontsList = ["FiraCode", "Iosevka", "Monoid", "ProggyClean", "RobotoMono", "ZedMono"]
font = "Iosevka Nerd Font"
fontNormal = "Light"
fontBold = "Light"
fontItalic = "Light Italic"
fontBoldItalic = "Light Italic"
fontSize = 15
cols = 120
rows = 28
opacity = {{ $opacity }}
{{ if lt ($opacity | float64) 1.0 }}
blur = 20
{{ else }}
blur = 0
{{ end}}
{{ if eq .chezmoi.os "darwin" }}
[data.path]
homebrew = {{ (joinPath .chezmoi.homeDir ".brew" | quote) }}
{{ end }}