From a99e0020abc2fce2d2456ceecfece82a6928f50c Mon Sep 17 00:00:00 2001 From: Firas Abuzaid Date: Tue, 4 Feb 2025 15:44:31 -0800 Subject: [PATCH] Switch to asdf --- .asdfrc | 1 + .gitconfig | 5 +++++ .tool-versions | 3 +++ .zshrc | 39 ++++++++++++++++----------------------- install.sh | 4 +++- tools-to-install.txt | 32 ++++++++++++++++---------------- 6 files changed, 44 insertions(+), 40 deletions(-) create mode 100644 .asdfrc create mode 100644 .tool-versions diff --git a/.asdfrc b/.asdfrc new file mode 100644 index 0000000..e600bd0 --- /dev/null +++ b/.asdfrc @@ -0,0 +1 @@ +legacy_version_file = yes diff --git a/.gitconfig b/.gitconfig index c6b8e00..94e99f8 100644 --- a/.gitconfig +++ b/.gitconfig @@ -44,3 +44,8 @@ whitespace = red reverse [rebase] updateRefs = true +[filter "lfs"] + smudge = git-lfs smudge -- %f + process = git-lfs filter-process + required = true + clean = git-lfs clean -- %f diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000..76f14cd --- /dev/null +++ b/.tool-versions @@ -0,0 +1,3 @@ +nodejs 18.16.0 +python 3.12.6 +ruby 3.4.1 diff --git a/.zshrc b/.zshrc index a1c4b1e..7c1fb32 100644 --- a/.zshrc +++ b/.zshrc @@ -1,7 +1,5 @@ -#### FIG ENV VARIABLES #### -# Please make sure this block is at the start of this file. -[ -s ~/.fig/shell/pre.sh ] && source ~/.fig/shell/pre.sh -#### END FIG ENV VARIABLES #### +# Q pre block. Keep at the top of this file. +[[ -f "${HOME}/Library/Application Support/amazon-q/shell/zshrc.pre.zsh" ]] && builtin source "${HOME}/Library/Application Support/amazon-q/shell/zshrc.pre.zsh" DEFAULT_USER=`whoami` prompt_context(){} @@ -92,28 +90,23 @@ source $ZSH/oh-my-zsh.sh # alias zshconfig="mate ~/.zshrc" # alias ohmyzsh="mate ~/.oh-my-zsh" -# >>> conda initialize >>> -# !! Contents within this block are managed by 'conda init' !! -__conda_setup="$('/Users/fabuzaid/anaconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)" -if [ $? -eq 0 ]; then - eval "$__conda_setup" -else - if [ -f "/Users/fabuzaid/anaconda3/etc/profile.d/conda.sh" ]; then - . "/Users/fabuzaid/anaconda3/etc/profile.d/conda.sh" - else - export PATH="/Users/fabuzaid/anaconda3/bin:$PATH" - fi -fi -unset __conda_setup -# <<< conda initialize <<< - POWERLEVEL9K_DISABLE_CONFIGURATION_WIZARD=true -#### FIG ENV VARIABLES #### -# Please make sure this block is at the end of this file. -[ -s ~/.fig/fig.sh ] && source ~/.fig/fig.sh -#### END FIG ENV VARIABLES #### +plugins=(virtualenv) +POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status virtualenv) + if [ -f $HOME/dotfiles/.zshrc.local ]; then source $HOME/dotfiles/.zshrc.local fi + + +autoload -U +X bashcompinit && bashcompinit + +[[ -f "$HOME/fig-export/dotfiles/dotfile.zsh" ]] && builtin source "$HOME/fig-export/dotfiles/dotfile.zsh" + +# Q post block. Keep at the bottom of this file. +[[ -f "${HOME}/Library/Application Support/amazon-q/shell/zshrc.post.zsh" ]] && builtin source "${HOME}/Library/Application Support/amazon-q/shell/zshrc.post.zsh" + +# Add binaries installed by asdf to path +export PATH="$HOME/.asdf/shims:$PATH" diff --git a/install.sh b/install.sh index 8803e7d..d87d235 100755 --- a/install.sh +++ b/install.sh @@ -14,7 +14,9 @@ ln -sfn ${CURR_DIR}/.inputrc ln -sfn ${CURR_DIR}/.pyrc ln -sfn ${CURR_DIR}/.tmux.conf ln -sfn ${CURR_DIR}/.sqliterc -ln -sfn ${CURR_DIR}/.ctags .ctags +ln -sfn ${CURR_DIR}/.ctags ln -sfn ${CURR_DIR}/.psqlrc +ln -sfn ${CURR_DIR}/.asdfrc +ln -sfn ${CURR_DIR}/.tool-versions #(crontab -l 2>/dev/null; echo "1 * * * * ctags -R -o ~/tags ~/src") | crontab - diff --git a/tools-to-install.txt b/tools-to-install.txt index 3a92d36..f4b4879 100644 --- a/tools-to-install.txt +++ b/tools-to-install.txt @@ -1,16 +1,16 @@ -bat: https://github.com/sharkdp/bat -conda: https://docs.conda.io/en/latest/ -coreutils: https://formulae.brew.sh/formula/coreutils -curlx: https://curlx.dev/ -diff-so-fancy: https://github.com/so-fancy/diff-so-fancy -duf: https://github.com/muesli/duf -exa: https://the.exa.website/ -fig: https://fig.io/ -fx: https://github.com/antonmedv/fx -ghcup: https://www.haskell.org/ghcup/ -jq: https://stedolan.github.io/jq/ -nvm: https://github.com/nvm-sh/nvm -oh-my-zsh: https://ohmyz.sh/ -powerlevel10k: https://github.com/romkatv/powerlevel10k -ripgrep: https://github.com/BurntSushi/ripgrep -tldr: https://tldr.sh +asdf: https://asdf-vm.com/guide/getting-started.html +bat: https://github.com/sharkdp/bat +conda: https://docs.conda.io/en/latest/ +coreutils: https://formulae.brew.sh/formula/coreutils +curlx: https://curlx.dev/ +diff-so-fancy: https://github.com/so-fancy/diff-so-fancy +duf: https://github.com/muesli/duf +exa: https://the.exa.website/ +fig: https://fig.io/ +fx: https://github.com/antonmedv/fx +ghcup: https://www.haskell.org/ghcup/ +jq: https://stedolan.github.io/jq/ +oh-my-zsh: https://ohmyz.sh/ +powerlevel10k: https://github.com/romkatv/powerlevel10k +ripgrep: https://github.com/BurntSushi/ripgrep +tldr: https://tldr.sh