mirror of
https://github.com/Xevion/dotfiles.git
synced 2025-12-09 08:07:12 -06:00
fix: correct WSL detection and improve platform-specific configuration
- Set WSL detection to false by default for proper conditional evaluation - Add delta as diff pager for improved git diff output - Change Windows cd command from nu to powershell.exe with -NoLogo flag - Refactor .chezmoiignore to use clearer platform-specific sections - Fix WSL-only files to be properly excluded on non-WSL systems - Separate Linux/Unix and Windows file exclusions for better clarity - Remove zsh profile from Cursor settings (migrated to Fish shell)
This commit is contained in:
@@ -28,7 +28,7 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- /* Detect if running in WSL */ -}}
|
{{- /* Detect if running in WSL */ -}}
|
||||||
{{- $wsl := true -}}
|
{{- $wsl := false -}}
|
||||||
{{- if eq .chezmoi.os "linux" -}}
|
{{- if eq .chezmoi.os "linux" -}}
|
||||||
{{- $wsl = (.chezmoi.kernel.osrelease | lower | contains "microsoft") -}}
|
{{- $wsl = (.chezmoi.kernel.osrelease | lower | contains "microsoft") -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
@@ -47,6 +47,7 @@ args = [
|
|||||||
wsl = {{ $wsl }}
|
wsl = {{ $wsl }}
|
||||||
|
|
||||||
[diff]
|
[diff]
|
||||||
|
pager = "delta"
|
||||||
scriptContents = false
|
scriptContents = false
|
||||||
|
|
||||||
[data.cpu]
|
[data.cpu]
|
||||||
@@ -70,7 +71,8 @@ args = [
|
|||||||
|
|
||||||
{{ if eq .chezmoi.os "windows" }}
|
{{ if eq .chezmoi.os "windows" }}
|
||||||
[cd]
|
[cd]
|
||||||
command = "nu"
|
command = "powershell.exe"
|
||||||
|
args = ["-NoLogo"]
|
||||||
{{ else }}
|
{{ else }}
|
||||||
[cd]
|
[cd]
|
||||||
command = "fish"
|
command = "fish"
|
||||||
|
|||||||
@@ -1,10 +1,16 @@
|
|||||||
hooks
|
hooks
|
||||||
tool-versions
|
tool-versions
|
||||||
|
|
||||||
{{/* generated files, cached files, anything that might change unnecessarily */}}
|
{{/* WSL Only Files */}}
|
||||||
|
{{ if (not .wsl) }}
|
||||||
|
|
||||||
{{ if eq .chezmoi.os "windows" }}
|
setup-wsl-gpg.sh
|
||||||
{{/* Ignore Linux/Unix-only files on Windows */}}
|
.gnupg/**
|
||||||
|
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{/* Linux/Unix Only Files */}}
|
||||||
|
{{ if (not (eq .chezmoi.os "linux")) }}
|
||||||
|
|
||||||
# Shell configs (Linux-only)
|
# Shell configs (Linux-only)
|
||||||
.scripts
|
.scripts
|
||||||
@@ -16,18 +22,17 @@ key.txt
|
|||||||
|
|
||||||
# Linux-only config directories
|
# Linux-only config directories
|
||||||
.config/kitty
|
.config/kitty
|
||||||
|
.config/fish
|
||||||
|
.config/Code
|
||||||
|
.config/Cursor
|
||||||
|
.config/lazygit
|
||||||
|
|
||||||
{{ else }}
|
{{ end }}
|
||||||
{{/* Ignore Windows-only files on Linux/macOS */}}
|
|
||||||
|
|
||||||
# Windows-only
|
{{/* Windows Only Files */}}
|
||||||
Documents/PowerShell
|
{{ if (not (eq .chezmoi.os "windows")) }}
|
||||||
|
|
||||||
|
Documents/
|
||||||
AppData/
|
AppData/
|
||||||
|
|
||||||
{{/* WSL-specific: .gnupg is symlinked to Windows GPG directory */}}
|
|
||||||
{{ if not .wsl }}
|
|
||||||
# On non-WSL Linux, .gnupg is managed separately (not via chezmoi)
|
|
||||||
.gnupg
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
@@ -34,9 +34,6 @@
|
|||||||
"path": "bash",
|
"path": "bash",
|
||||||
"icon": "terminal-bash"
|
"icon": "terminal-bash"
|
||||||
},
|
},
|
||||||
"zsh": {
|
|
||||||
"path": "zsh"
|
|
||||||
},
|
|
||||||
"fish": {
|
"fish": {
|
||||||
"path": "fish"
|
"path": "fish"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user