Refactor zsh configs

This commit is contained in:
david
2025-04-04 16:55:39 -05:00
parent 06c3ef0b40
commit a8f1fcfaa8
6 changed files with 22 additions and 19 deletions

View File

@ -1,3 +1,4 @@
# TODO: refactor this file; separate general dev from rs specific
# set env vars, path updates, etc
[[ -a $HOME/.rs-vars ]] \
&& source $HOME/.rs-vars \

View File

@ -0,0 +1,10 @@
# env vars
export EDITOR='vim' # TODO: update to nvim once configured
export HOME_BOX="$HOME/dbox"
export DIR_DEV="$HOME/dev"
export DIR_CONFIG="$HOME/.config"
export XDG_CONFIG_HOME=$DIR_CONFIG
export ZDOTDIR="$DIR_CONFIG/zsh"
export DIR_LOCAL="$HOME/.local"
export DIR_BUILD="$DIR_LOCAL/build"

View File

@ -1,15 +1,6 @@
# use vim-like control in shell
set -o vi
# env vars
export EDITOR='vim' # TODO: update to nvim once configured
export HOME_BOX="$HOME/dbox"
export DIR_DEV="$HOME/dev"
export DIR_CONFIG="$HOME/.config"
export XDG_CONFIG_HOME=$DIR_CONFIG
export DIR_LOCAL="$HOME/.local"
export DIR_BUILD="$DIR_LOCAL/build"
# path updates
export PATH=$DIR_LOCAL/bin:$DIR_LOCAL/scripts:$PATH
export PATH=$PATH:/opt/homebrew/opt/ccache/libexec
@ -36,15 +27,12 @@ alias pdt='ping -c 4 drinkingtea.net'
alias weather='curl wttr.in'
alias shrug='echo "¯\\_(ツ)_/¯"'
[[ -e "$HOME/.profile" ]] && source "$HOME/.profile"
# source extensions and system-specific files
[[ -e "$HOME/.profile" ]] && source "$HOME/.profile" # TODO: do i want to source .profile?
[[ -a "$ZDOTDIR/.zsh-life-system" ]] && source "$ZDOTDIR/.zsh-life-system"
[[ -a "$ZDOTDIR/.zsh-job-rs" ]] && source "$ZDOTDIR/.zsh-job-rs"
# add machine-specific configs as appropriate
[[ -a "$DIR_CONFIG/zsh/.zshrc-life-system" ]] &&
source "$DIR_CONFIG/zsh/.zshrc-life-system"
# TODO: refactor the below so that general dev is separate from rs specific stuff
[[ -a $DIR_CONFIG/zsh/.zshrc-job-rs ]] &&
source $DIR_CONFIG/zsh/.zshrc-job-rs
# TODO: refactor the below; simplify or at least move elsewhere
alias lintjs='npx prettier --write'
export DEVKITARM=/opt/devkitpro/devkitARM
. /opt/homebrew/opt/asdf/libexec/asdf.sh # TODO: ensure not duplicated asdf logic