mirror of
https://github.com/Xevion/dotfiles.git
synced 2025-12-06 03:14:52 -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 -}}
|
||||
|
||||
{{- /* Detect if running in WSL */ -}}
|
||||
{{- $wsl := true -}}
|
||||
{{- $wsl := false -}}
|
||||
{{- if eq .chezmoi.os "linux" -}}
|
||||
{{- $wsl = (.chezmoi.kernel.osrelease | lower | contains "microsoft") -}}
|
||||
{{- end -}}
|
||||
@@ -47,6 +47,7 @@ args = [
|
||||
wsl = {{ $wsl }}
|
||||
|
||||
[diff]
|
||||
pager = "delta"
|
||||
scriptContents = false
|
||||
|
||||
[data.cpu]
|
||||
@@ -70,7 +71,8 @@ args = [
|
||||
|
||||
{{ if eq .chezmoi.os "windows" }}
|
||||
[cd]
|
||||
command = "nu"
|
||||
command = "powershell.exe"
|
||||
args = ["-NoLogo"]
|
||||
{{ else }}
|
||||
[cd]
|
||||
command = "fish"
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
hooks
|
||||
tool-versions
|
||||
|
||||
{{/* generated files, cached files, anything that might change unnecessarily */}}
|
||||
{{/* WSL Only Files */}}
|
||||
{{ if (not .wsl) }}
|
||||
|
||||
{{ if eq .chezmoi.os "windows" }}
|
||||
{{/* Ignore Linux/Unix-only files on Windows */}}
|
||||
setup-wsl-gpg.sh
|
||||
.gnupg/**
|
||||
|
||||
{{ end }}
|
||||
|
||||
{{/* Linux/Unix Only Files */}}
|
||||
{{ if (not (eq .chezmoi.os "linux")) }}
|
||||
|
||||
# Shell configs (Linux-only)
|
||||
.scripts
|
||||
@@ -16,18 +22,17 @@ key.txt
|
||||
|
||||
# Linux-only config directories
|
||||
.config/kitty
|
||||
.config/fish
|
||||
.config/Code
|
||||
.config/Cursor
|
||||
.config/lazygit
|
||||
|
||||
{{ else }}
|
||||
{{/* Ignore Windows-only files on Linux/macOS */}}
|
||||
{{ end }}
|
||||
|
||||
# Windows-only
|
||||
Documents/PowerShell
|
||||
{{/* Windows Only Files */}}
|
||||
{{ if (not (eq .chezmoi.os "windows")) }}
|
||||
|
||||
Documents/
|
||||
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",
|
||||
"icon": "terminal-bash"
|
||||
},
|
||||
"zsh": {
|
||||
"path": "zsh"
|
||||
},
|
||||
"fish": {
|
||||
"path": "fish"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user