From 1452579569108e6afff48493dc6905c352051963 Mon Sep 17 00:00:00 2001 From: Riley Smith Date: Fri, 22 Mar 2024 01:02:01 -0700 Subject: [PATCH] clean up zshrc file --- .chezmoiignore | 2 ++ dot_gitconfig | 55 +++++++++++++++++++++++++++++++++++++++ dot_zshrc_darwin | 68 ++++++++++++++---------------------------------- 3 files changed, 76 insertions(+), 49 deletions(-) create mode 100644 dot_gitconfig diff --git a/.chezmoiignore b/.chezmoiignore index 19c5297..360e134 100644 --- a/.chezmoiignore +++ b/.chezmoiignore @@ -14,3 +14,5 @@ launch-sway.sh {{ end }} install.sh +README.md +LICENSE diff --git a/dot_gitconfig b/dot_gitconfig new file mode 100644 index 0000000..2f57baf --- /dev/null +++ b/dot_gitconfig @@ -0,0 +1,55 @@ +[user] + signingkey = 59D9762F674151DF + name = Riley Smith + email = riley@rileysmith.me +[maintenance] + repo = /Users/rileysmith/znap/zsh-autocomplete + repo = /Users/rileysmith/znap/zsh-autosuggestions + repo = /Users/rileysmith/znap/zsh-completions + repo = /Users/riley/znap/zsh-autocomplete + repo = /Users/riley/znap/zsh-autosuggestions + repo = /Users/riley/znap/zsh-completions + repo = /Users/riley/repos/znap/marlonrichert/zsh-autocomplete + repo = /Users/riley/repos/znap/zsh-users/zsh-autosuggestions + repo = /Users/riley/repos/znap/zsh-users/zsh-completions +[gpg] + program = /opt/homebrew/bin/gpg +[init] + defaultBranch = main +[pull] + rebase = false +[push] + autoSetupRemote = true +[filter "lfs"] + clean = git-lfs clean -- %f + smudge = git-lfs smudge -- %f + process = git-lfs filter-process + required = true + +[core] + pager = delta + autocrlf = input + safecrlf = true + +[interactive] + diffFilter = delta --color-only + +[delta] + navigate = true # use n and N to move between diff sections + light = false # set to true if you're in a terminal w/ a light background color (e.g. the default macOS terminal) + side-by-side = true + +[merge] + conflictstyle = diff3 + +[diff] + colorMoved = default + +[alias] + co = checkout + ci = commit + st = status + br = branch + hist = log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short + type = cat-file -t + dump = cat-file -p diff --git a/dot_zshrc_darwin b/dot_zshrc_darwin index e0081f7..fbaa153 100644 --- a/dot_zshrc_darwin +++ b/dot_zshrc_darwin @@ -1,26 +1,29 @@ -zstyle ':znap:*' repos-dir ~/znap -source ~/repos/zsh-snap/znap.zsh -# plugins +# Download Znap, if it's not there yet. +[[ -r ~/Repos/znap/znap.zsh ]] || + git clone --depth 1 -- \ + https://github.com/marlonrichert/zsh-snap.git ~/repos/znap -# starship -export SPACESHIP_PROMPT_ASYNC=FALSE -#znap eval starship 'starship init zsh --print-full-init' -#znap prompt + +zstyle ':znap:*' repos-dir ~/repos/znap +source ~/repos/zsh-snap/znap.zsh znap source marlonrichert/zsh-autocomplete -zstyle ':autocomplete:*' min-input 1 +zstyle ':autocomplete:*' min-input 2 znap source zsh-users/zsh-autosuggestions znap source zsh-users/zsh-completions +export NVM_LAZY_LOAD=true +export NVM_COMPLETION=true +export NVM_AUTO_USE=true -# User configuration +znap source lukechilds/zsh-nvm -# export MANPATH="/usr/local/man:$MANPATH" - -# You may need to manually set your language environment -# export LANG=en_US.UTF-8 +timezsh() { + shell=${1-$SHELL} + for i in $(seq 1 10); do /usr/bin/time $shell -i -c exit; done +} # Preferred editor for local and remote sessions if [[ -n $SSH_CONNECTION ]]; then @@ -33,8 +36,8 @@ fi # export ARCHFLAGS="-arch x86_64" # Aliases -alias ls="exa" -alias tree="exa --tree" +alias ls="eza" +alias tree="eza --tree" # change cat to bat alias cat="bat" @@ -63,11 +66,6 @@ alias gx='gitx --all' alias got='git ' alias get='git ' - -# tabtab source for packages -# uninstall by removing these lines -[[ -f ~/.config/tabtab/zsh/__tabtab.zsh ]] && . ~/.config/tabtab/zsh/__tabtab.zsh || true - # bun completions [ -s "/Users/rileysmith/.bun/_bun" ] && source "/Users/rileysmith/.bun/_bun" @@ -76,37 +74,9 @@ export BUN_INSTALL="/Users/rileysmith/.bun" export PATH="$BUN_INSTALL/bin:$PATH" # Path Stuff -export ANDROID_HOME=$HOME/Library/Android/sdk -export PATH=$PATH:$ANDROID_HOME/emulator -export PATH=$PATH:$ANDROID_HOME/platform-tools -export PATH=$PATH:$HOME/.new_local/bin -export PATH=/opt/homebrew/opt/mysql-client/bin:$PATH -export JAVA_HOME=`/usr/libexec/java_home -v 17.0.8` +export PATH=$PATH:/Users/riley/.spicetify -# zoxide eval "$(zoxide init zsh)" -# rbenv -eval "$(rbenv init - zsh)" - eval "$(starship init zsh)" -if [[ $TERM_PROGRAM != "WarpTerminal" ]]; then - test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh" -fi - - -# ( -# if ! ssh-add -l >/dev/null 2>&1; then -# ssh-add --apple-load-keychain >/dev/null 2>&1 -# fi & -# ) -#znap function _sshadd ssh 'eval "$(ssh-add --apple-load-keychain)"' -# compctl -K _sshadd ssh - -source /Users/riley/.docker/init-zsh.sh || true # Added by Docker Desktop - -export NVM_DIR="$HOME/.config/nvm" -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm -[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion -export PATH=$PATH:/Users/riley/.spicetify