Refactor zsh configs
This commit is contained in:
		@@ -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 \
 | 
			
		||||
							
								
								
									
										10
									
								
								src_files/.config/zsh/.zshenv
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								src_files/.config/zsh/.zshenv
									
									
									
									
									
										Normal 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"
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										38
									
								
								src_files/.config/zsh/.zshrc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								src_files/.config/zsh/.zshrc
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,38 @@
 | 
			
		||||
# use vim-like control in shell
 | 
			
		||||
set -o vi
 | 
			
		||||
 | 
			
		||||
# path updates
 | 
			
		||||
export PATH=$DIR_LOCAL/bin:$DIR_LOCAL/scripts:$PATH
 | 
			
		||||
export PATH=$PATH:/opt/homebrew/opt/ccache/libexec
 | 
			
		||||
export PATH=$PATH:~/bin/android-sdk-darwin/platform-tools:/opt/homebrew/opt/ccache/libexec
 | 
			
		||||
 | 
			
		||||
# shortcuts for common commands
 | 
			
		||||
alias 3e='echo;echo;echo'
 | 
			
		||||
alias 12e='3e;3e;3e;3e'
 | 
			
		||||
alias cl='clear; '
 | 
			
		||||
alias cls='clear;ls'
 | 
			
		||||
alias tms='tmux-sessionizer'
 | 
			
		||||
 | 
			
		||||
# executable name overrides
 | 
			
		||||
alias ls='ls -F'
 | 
			
		||||
alias youtube-dl='youtube-dl --write-info-json'
 | 
			
		||||
 | 
			
		||||
# git stuff
 | 
			
		||||
alias gfo='git fetch origin'
 | 
			
		||||
alias gpo='git pull origin'
 | 
			
		||||
alias gfpo='git fetch origin; git pull origin'
 | 
			
		||||
 | 
			
		||||
# misc commands
 | 
			
		||||
alias pdt='ping -c 4 drinkingtea.net'
 | 
			
		||||
alias weather='curl wttr.in'
 | 
			
		||||
alias shrug='echo "¯\\_(ツ)_/¯"'
 | 
			
		||||
 | 
			
		||||
# 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"
 | 
			
		||||
 | 
			
		||||
# 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
 | 
			
		||||
		Reference in New Issue
	
	Block a user