Last active
October 1, 2025 19:56
-
-
Save Victor-Fiamoncini/80675aacf5a09cd340500f055330c07f to your computer and use it in GitHub Desktop.
ZSH Settings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### ZSH & ZINIT | |
| export ZSH="/home/$USER/.oh-my-zsh" | |
| ZSH_THEME="robbyrussell" | |
| plugins=(git) | |
| source $ZSH/oh-my-zsh.sh | |
| if [[ ! -f $HOME/.local/share/zinit/zinit.git/zinit.zsh ]]; then | |
| print -P "%F{33} %F{220}Installing %F{33}ZDHARMA-CONTINUUM%F{220} Initiative Plugin Manager (%F{33}zdharma-continuum/zinit%F{220})…%f" | |
| command mkdir -p "$HOME/.local/share/zinit" && command chmod g-rwX "$HOME/.local/share/zinit" | |
| command git clone https://github.com/zdharma-continuum/zinit "$HOME/.local/share/zinit/zinit.git" && \ | |
| print -P "%F{33} %F{34}Installation successful.%f%b" || \ | |
| print -P "%F{160} The clone has failed.%f%b" | |
| fi | |
| source "$HOME/.local/share/zinit/zinit.git/zinit.zsh" | |
| autoload -Uz _zinit | |
| (( ${+_comps} )) && _comps[zinit]=_zinit | |
| zinit light-mode for \ | |
| zdharma-continuum/zinit-annex-as-monitor \ | |
| zdharma-continuum/zinit-annex-bin-gem-node \ | |
| zdharma-continuum/zinit-annex-patch-dl \ | |
| zdharma-continuum/zinit-annex-rust | |
| zinit light zdharma-continuum/fast-syntax-highlighting | |
| zinit light zsh-users/zsh-autosuggestions | |
| zinit light zsh-users/zsh-completions | |
| zinit light-mode for \ | |
| zdharma-continuum/zinit-annex-as-monitor \ | |
| zdharma-continuum/zinit-annex-bin-gem-node \ | |
| zdharma-continuum/zinit-annex-patch-dl \ | |
| zdharma-continuum/zinit-annex-rust | |
| unsetopt SHARE_HISTORY | |
| unsetopt INC_APPEND_HISTORY | |
| # Mise | |
| eval "$(~/.local/bin/mise activate zsh)" | |
| ### Laravel Sail Alias | |
| alias sail='[ -f sail ] && sh sail || sh vendor/bin/sail' | |
| ### Neovim | |
| export PATH="/opt/nvim-linux64/bin:$PATH" | |
| ### Cargo | |
| export PATH="/home/$USER/.cargo/bin:$PATH" | |
| ### Lunarvim | |
| export PATH=/home/$USER/.local/bin:$PATH | |
| ### Java | |
| export JAVA_HOME=$(dirname $(dirname $(readlink -f $(which java)))) | |
| export PATH=$PATH:$JAVA_HOME/bin | |
| ### Gatling | |
| export GATLING_HOME=/home/$USER/gatling-bundle | |
| export PATH=/home/$USER/gatling-bundle/bin:$PATH | |
| # Python Virtualenv | |
| activate_virtualenv() { | |
| local OLD_PATH=$PWD | |
| local VENV_DIR=${1:-'venv'} # default venv name | |
| local FOUND | |
| while [ -z "$FOUND" ] ; do | |
| if ls ${VENV_DIR}/bin/activate 2>/dev/null >/dev/null ; then | |
| source ${VENV_DIR}/bin/activate | |
| FOUND='FOUND' | |
| break | |
| fi | |
| if [ "/home/$USER" == "$PWD" ] || [ '/' == "$PWD" ] ; then | |
| break | |
| fi | |
| cd .. | |
| done | |
| if [ -z "$FOUND" ] ;then | |
| echo "venv not found" | |
| else | |
| VERSION=`python3 --version 2>&1` | |
| printf 'Using %s\n' "$VERSION" | |
| echo found on $PWD | |
| fi | |
| cd $OLD_PATH | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment