mirror of
https://github.com/Xevion/dotfiles.git
synced 2025-12-09 10:07:03 -06:00
Switch to appropriate comment style
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# Detect chassis type (likely: laptop | desktop | container)
|
||||
# https://www.freedesktop.org/software/systemd/man/latest/hostnamectl.html#chassis%20%5BTYPE%5D
|
||||
{{- /* Detect chassis type (likely: laptop | desktop | container) */ -}}
|
||||
{{- /* https://www.freedesktop.org/software/systemd/man/latest/hostnamectl.html#chassis%20%5BTYPE%5D */ -}}
|
||||
{{- $chassisType := "desktop" }}
|
||||
{{- if eq .chezmoi.os "darwin" }}
|
||||
{{- if contains "MacBook" (output "sysctl" "-n" "hw.model") }}
|
||||
@@ -13,7 +13,7 @@
|
||||
{{- $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 }}
|
||||
|
||||
# Detect number of CPU cores and threads
|
||||
{{- /* Detect number of CPU cores and threads */ -}}
|
||||
{{- $cpuCores := 1 }}
|
||||
{{- $cpuThreads := 1 }}
|
||||
{{- if eq .chezmoi.os "darwin" }}
|
||||
@@ -27,7 +27,7 @@
|
||||
{{- $cpuThreads = (output "powershell.exe" "-NoProfile" "-NonInteractive" "-Command" "(Get-CimInstance -ClassName 'Win32_Processor').NumberOfLogicalProcessors") | trim | atoi }}
|
||||
{{- end -}}
|
||||
|
||||
# Detect if running in WSL
|
||||
{{- /* Detect if running in WSL */ -}}
|
||||
{{- $wsl := true -}}
|
||||
{{- if eq .chezmoi.os "linux" -}}
|
||||
{{- $wsl = (.chezmoi.kernel.osrelease | lower | contains "microsoft") -}}
|
||||
|
||||
Reference in New Issue
Block a user