Update .zshrc and refactor related files as needed

This commit is contained in:
2025-01-26 00:20:27 -06:00
parent 562443c34f
commit 5dec68e3fe
12 changed files with 54 additions and 44 deletions

View File

@ -15,9 +15,9 @@ alias git-push-to-develop='git branch -D develop; git checkout -b develop; git p
alias gpdev='git-push-to-develop'
# misc shortcuts
alias journal="cd $HOMEBOX; $EDITOR .current-journal"
alias kra="cd $HOMEBOX/process/kra; open .current_kra"
alias gll="cd $DEVDIR/git/lampo/gitlab"
alias journal="cd $HOME_BOX; $EDITOR .current-journal"
alias kra="cd $HOME_BOX/process/kra; open .current_kra"
alias gll="cd $DIR_DEV/git/lampo/gitlab"
alias bet='bundle exec rspec'
alias bel='bundle exec standardrb'
alias belr='bundle exec rubocop'

View File

@ -1,7 +1,7 @@
# life system shortcuts
alias life-system="cd $HOMEBOX/life/system; clear; ls"
alias goals="clear; sed -n 2,7p $HOMEBOX/life/system/direction/goals/current-goals.txt"
alias note="cd $HOMEBOX/life/system/tasks/inbox; $EDITOR"
alias todo="cd $HOMEBOX/life/system/tasks; $EDITOR +5 todo.txt"
alias budget="open $HOMEBOX/life/finance/budget/.current"
alias life-system="cd $HOME_BOX/life/system; clear; ls"
alias goals="clear; sed -n 2,7p $HOME_BOX/life/system/direction/goals/current-goals.txt"
alias note="cd $HOME_BOX/life/system/tasks/inbox; $EDITOR"
alias todo="cd $HOME_BOX/life/system/tasks; $EDITOR +5 todo.txt"
alias budget="open $HOME_BOX/life/finance/budget/.current"

View File

@ -1,8 +1,8 @@
local omitted_dirs=(
$HOME
$HOMEBOX
$DEVDIR
$DEVDIR/git
$HOME_BOX
$DIR_DEV
$DIR_DEV/git
)
[[ ! ${omitted_dirs[(re)$(pwd)]} ]] &&
tmux new-window -d -n cmd &&

View File

@ -13,9 +13,9 @@ hydrate() {
local name_regex="^\([-_A-Za-z0-9]*\):.*$"
local existing_sessions=$([[ -n $(pgrep tmux) ]] && tmux list-sessions | sed "s/$name_regex/\1/" || echo '')
local search_dirs=(
$HOMEBOX
$DEVDIR
$DEVDIR/git/*
$HOME_BOX
$DIR_DEV
$DIR_DEV/git/*
)
local target_name=''
local target_path=''

View File

@ -3,49 +3,47 @@ set -o vi
# env vars
export EDITOR='vim' # TODO: update to nvim once configured
export HOMEBOX=$HOME'/dbox'
export DEVDIR=$HOME'/dev'
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=$HOME/.local/bin:$HOME/.local/scripts:$PATH
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
# executable name overrides
alias ls='ls -F'
#alias vim='nvim'
# shortcuts for common commands
alias 3e='echo;echo;echo'
alias 12e='3e;3e;3e;3e'
alias cl='clear; '
alias cls='clear;ls'
# 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'
# executable renames/paths
alias youtube-dl='youtube-dl --write-info-json'
# misc commands
alias pdt='ping -c 4 drinkingtea.net'
alias weather='curl wttr.in'
alias shrug='echo "¯\\_(ツ)_/¯"'
[[ -e $HOME/.profile ]] && source $HOME/.profile
[[ -e "$HOME/.profile" ]] && source "$HOME/.profile"
# add machine-specific configs as appropriate
[[ -a $HOME/.config/zsh/.zshrc-life-system ]] \
&& source $HOME/.config/zsh/.zshrc-life-system
[[ -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 $HOME/.config/zsh/.zshrc-job-rs ]] \
&& source $HOME/.config/zsh/.zshrc-job-rs
[[ -a $DIR_CONFIG/zsh/.zshrc-job-rs ]] &&
source $DIR_CONFIG/zsh/.zshrc-job-rs
alias lintjs='npx prettier --write'
export DEVKITARM=/opt/devkitpro/devkitARM
. /opt/homebrew/opt/asdf/libexec/asdf.sh # TODO: ensure not duplicated asdf logic