mirror of
https://github.com/AquaMorph/dotfiles.git
synced 2026-10-22 04:45:34 +00:00
feat(zsh): support cross-platform shell setup
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
{{ if eq .chezmoi.os "darwin" -}}
|
||||
# Initialize Homebrew on Apple Silicon or Intel Macs.
|
||||
if [[ -x /opt/homebrew/bin/brew ]]; then
|
||||
eval "$(/opt/homebrew/bin/brew shellenv)"
|
||||
elif [[ -x /usr/local/bin/brew ]]; then
|
||||
eval "$(/usr/local/bin/brew shellenv)"
|
||||
fi
|
||||
{{ else if eq .chezmoi.os "linux" -}}
|
||||
if [[ -f "$HOME/.config/scripts/setup.sh" ]]; then
|
||||
sh "$HOME/.config/scripts/setup.sh" -nr
|
||||
fi
|
||||
{{ end }}
|
||||
|
||||
# Load user settings from config file.
|
||||
if [[ -f "$HOME/.config/settings.conf" ]]; then
|
||||
source "$HOME/.config/settings.conf"
|
||||
fi
|
||||
|
||||
{{ if eq .chezmoi.os "linux" -}}
|
||||
if [[ $computer == 'w530' ]]; then
|
||||
if [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then
|
||||
exec startx
|
||||
fi
|
||||
fi
|
||||
{{ end -}}
|
||||
Reference in New Issue
Block a user