ENH control xmonad config with config flags

This commit is contained in:
Nathan Dwarshuis 2022-07-20 20:31:07 -04:00
parent c1e722d02f
commit 8a45bd526a
3 changed files with 21 additions and 18 deletions

View File

@ -3,15 +3,19 @@ diff:
pager: less -r
{{- $desktop := promptBool "desktop" false }}
{{- $laptop := and $desktop (promptBool "laptop" false) }}
{{- $emacs := and $desktop (promptBool "emacs" true) }}
data:
desktop: {{ $desktop }}
laptop: {{ $laptop }}
features:
{{- if $desktop }}
ansible: {{ promptBool "ansible" true }}
{{- end }}
ansible: {{ and $desktop (promptBool "ansible" true) }}
clevo: {{ and $laptop (promptBool "clevo keyboard" false) }}
optimus: {{ and $laptop (promptBool "optimus" false) }}
virtualbox: {{ and $desktop (promptBool "virtualbox" false) }}
xsane: {{ and $desktop (promptBool "xsane" false) }}
f5vpn: {{ and $desktop (promptBool "f5vpn" false) }}
development:
{{- if $desktop }}
{{- $emacs := promptBool "emacs" true }}
{{- /* emacs implies that most development options are true */}}
emacs: {{ $emacs }}
ruby: {{ or $emacs promptBool "ruby development" true }}
@ -24,4 +28,3 @@ data:
{{- /* these aren't implied by emacs */}}
matlab: {{ or $emacs promptBool "MATLAB development" true }}
github: {{ promptBool "GitHub development" true }}
{{- end }}

View File

@ -1,12 +0,0 @@
loglevel: Debug
features:
optimus: true
vpn: true
bluetooth: true
intel_backlight: true
clevo_backlight: true
wireless: true
virtualbox: true
xsane: true
battery: true
f5vpn: true

View File

@ -0,0 +1,12 @@
loglevel: Debug
features:
optimus: {{ .features.optimus }}
vpn: true
bluetooth: true
intel_backlight: true
clevo_backlight: {{ .features.clevo }}
wireless: {{ .laptop }}
virtualbox: {{ .features.virtualbox }}
xsane: {{ .features.xsane }}
battery: {{ .laptop }}
f5vpn: {{ .features.f5vpn }}