BIG REFACTOR; PLEASE BE ADVISED

finally going to commit that zshrc refactor

- smolvsdefault on altaria
- i3-utils refactor
- no need for custom scwrypt executable anymore
- time to say goodbye to the old dotwryn.env in favor of the new and improved rc.ds
- vim/rc.d refactor + QuickREPL and QuickCommand replacements for \r and \t
- going to stop tracking Archives explicitly until new hard drive
- tty-colorscheme is now referenced directly
- colorscheme/spring-sunset needed to swap primary/secondary colors for focus in i3 since it was confusing
- setup config no longer needs to create ~/.config/wryn/env.vim; added some dependencies to arch-linux
- switch from dmenu to rofi by default; allow .i3 overrides in colorschemes; tty-colorscheme is now referenced directly
This commit is contained in:
2024-05-07 16:38:40 -06:00
parent 466d4ec77d
commit ad66d50b11
64 changed files with 727 additions and 437 deletions

54
zsh/rc
View File

@ -1,51 +1,9 @@
#!/bin/zsh
source "$HOME/.config/wryn/env.zsh"
#####################################################################
INTERNAL_PLUGINS=(
"$DOTWRYN/zsh/config" # must load first
$(find "$DOTWRYN/zsh" -mindepth 1 -maxdepth 1 -type f \
| grep -v '/rc$' \
| grep -v '/config$' \
| grep -v '/\.[^/]\+$' \
)
)
SET_PREFERRED_EDITOR() {
# load preference from environment
[[ ${#PREFERRED_EDITOR[@]} -eq 0 ]] && {
echo 'unable to find $PREFERRED_EDITOR environment variable'
for RC_FILE in $(find "${0:a:h}/rc.d/" -type f | sort)
do
source "$RC_FILE" || {
echo "something went wrong in '$RC_FILE'; aborting dotwryn load"
return 1
}
[[ $EDITOR == "${PREFERRED_EDITOR[-1]}" ]] \
&& [[ $VISUAL == "${PREFERENCE[-1]}" ]] \
&& return 0
local AVAILABLE_EDITOR=$EDITOR
for program in $PREFERRED_EDITOR
do
which $program >/dev/null 2>&1 \
&& AVAILABLE_EDITOR="$program" \
&& break
done
export EDITOR="$AVAILABLE_EDITOR"
export VISUAL="$AVAILABLE_EDITOR"
}
#####################################################################
for p in $INTERNAL_PLUGINS; do source $p; done
for p in $EXTERNAL_PLUGINS; do [ -f $p ] && source $p; done
SET_PREFERRED_EDITOR
WELCOME
echo $PATH | grep -q "^\\(.*:\\|\\)$HOME/.local/bin\\(:.*\\|\\)$" \
|| export PATH="$HOME/.local/bin:$PATH"
#####################################################################
[[ $TERM =~ alacritty ]] \
&& [[ $(tmux -L omni.socket list-clients | wc -l) -eq 0 ]] \
&& scwrypts tmux omni
true
done
return 0