Cleanup .zshrc

This commit is contained in:
2026-03-07 02:09:02 -05:00
parent c569d43f15
commit cf5d36e63b
2 changed files with 245 additions and 142 deletions

View File

@@ -1,65 +1,21 @@
# Clean version of .zshrc
export ZSH="$HOME/.oh-my-zsh" export ZSH="$HOME/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
# gnzh jtriley juanghurtado kphoen
ZSH_THEME="kphoen" ZSH_THEME="kphoen"
# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in $ZSH/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=()
# CASE_SENSITIVE="true"
# HYPHEN_INSENSITIVE="true"
# Auto-update behaviour:
# - auto: update automatically without asking
# - disabled: disable automatic update
# - reminder: remind to update when it's time
zstyle ':omz:update' mode auto zstyle ':omz:update' mode auto
# Change how often to auto-update (in days). DISABLE_MAGIC_FUNCTIONS="false"
# zstyle ':omz:update' frequency 13 DISABLE_AUTO_TITLE="false"
ENABLE_CORRECTION="true"
COMPLETION_WAITING_DOTS="%F{yellow}"
HIST_STAMPS="%Y-%m-%d %H:%M"
# Uncomment the following line if pasting URLs and other text is messed up.
DISABLE_MAGIC_FUNCTIONS="true"
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
ENABLE_CORRECTION="false"
# Uncomment the following line to display red dots whilst waiting for completion.
# You can also set it to another string to have that shown instead of the default red dots.
# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f"
COMPLETION_WAITING_DOTS="%F{yellow}....hmm..."
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# see 'man strftime' for details.
HIST_STAMPS="yy-mm-dd"
# ZSH_CUSTOM=/path/to/new-custom-folder
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
plugins=( plugins=(
git git
zsh-autosuggestions zsh-autosuggestions
zsh-syntax-highlighting zsh-syntax-highlighting
archlinux archlinux
sudo sudo
ufw ufw
tmux tmux
kubectl kubectl
@@ -68,99 +24,74 @@ plugins=(
source $ZSH/oh-my-zsh.sh source $ZSH/oh-my-zsh.sh
# export MANPATH="/usr/local/man:$MANPATH" # --- Environment ---
# Compilation flags
export ARCHFLAGS="-arch x86_64"
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
export LC_ALL=en_CA.UTF-8 export LC_ALL=en_CA.UTF-8
# Starting a session from the TTY
# if [ -z $DISPLAY ] && [ $(tty) = /dev/tty1 ]
#then
# Autostart Hyprland
# export GTK_THEME=adw-gtk3-dark:dark
# exec Hyprland
# elif [ -z $DISPLAY ] && [ $(tty) = /dev/tty2 ]
# then
# Autostart X at login for tty2, using i3 WM
# export GTK_THEME=adw-gtk3-dark:dark
# exec startx
#fi
# In case I need to enable NVIDIA from start
# export __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia
export EDITOR=nvim export EDITOR=nvim
export ARCHFLAGS="-arch x86_64"
export GPG_TTY=$(tty)
export XMODIFIERS=@im=fcitx
# Jack config for SuperCollider server # --- Paths ---
export SC_JACK_DEFAULT_INPUTS="system:capture_1,system:capture_2" export PATH="$HOME/.local/bin:$PATH"
export SC_JACK_DEFAULT_OUTPUTS="system:playback_1,system:playback_2"
# Android Studio and Android SDK # Android SDK
export CAPACITOR_ANDROID_STUDIO_PATH="/usr/bin/android-studio" export CAPACITOR_ANDROID_STUDIO_PATH="/usr/bin/android-studio"
export ANDROID_SDK_ROOT="$HOME/Android/Sdk" export ANDROID_SDK_ROOT="$HOME/Android/Sdk"
export ANDROID_HOME="$HOME/Android/Sdk" export ANDROID_HOME="$HOME/Android/Sdk"
# Bun
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
[ -s "$HOME/.bun/_bun" ] && source "$HOME/.bun/_bun"
# NVM
export NVM_DIR="$HOME/.nvm"
alias snvm='[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"'
# --- Optional sources ---
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
[ -f "$HOME/Downloads/google-cloud-sdk/path.zsh.inc" ] && source "$HOME/Downloads/google-cloud-sdk/path.zsh.inc"
[ -f "$HOME/Downloads/google-cloud-sdk/completion.zsh.inc" ] && source "$HOME/Downloads/google-cloud-sdk/completion.zsh.inc"
# --- SuperCollider / JACK ---
export SC_JACK_DEFAULT_INPUTS="system:capture_1,system:capture_2"
export SC_JACK_DEFAULT_OUTPUTS="system:playback_1,system:playback_2"
# --- Aliases: system ---
alias SHUTDOWN="shutdown now" alias SHUTDOWN="shutdown now"
alias please='sudo'
alias ip="ip --color"
# --- Aliases: network & wifi ---
alias connectWifi='sudo wpa_supplicant -B -i wlo1 -c /etc/wpa_supplicant/wpa_supplicant.conf' alias connectWifi='sudo wpa_supplicant -B -i wlo1 -c /etc/wpa_supplicant/wpa_supplicant.conf'
alias weather="curl https://wttr.in"
# --- Aliases: directories ---
alias project='cd ~/Partage/Projects/' alias project='cd ~/Partage/Projects/'
alias coding='cd $HOME/Partage/Coding' alias coding='cd $HOME/Partage/Coding'
alias gotop="gotop -l kitchensink --nvidia" # --- Aliases: desktop & media ---
alias setbackground="feh --bg-fill --randomize $HOME/.wallpaper/" alias setbackground="feh --bg-fill --randomize $HOME/.wallpaper/"
alias fallinlight="feh --bg-fill --randomize $HOME/Pictures/Fallin\'\ Light"
alias fallinlight="feh --bg-fill --randomize /home/antoine/Pictures/Fallin\'\ Light" alias gotop="gotop -l kitchensink --nvidia"
alias micvol="wpctl set-volume @DEFAULT_SOURCE@" alias micvol="wpctl set-volume @DEFAULT_SOURCE@"
alias playcd='cdda2wav -D /dev/sr0 -t 1+ -B - | pw-play --rate 44100 --quality 15 -'
alias mirror="wl-mirror $(niri msg --json focused-output | jq -r .name)"
alias enable-nvidia='export __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia' # --- Aliases: input method ---
alias weather="curl https://wttr.in"
alias cal='cal -m'
alias please='sudo'
alias ibus-en='ibus engine xkb:us:intl:eng' alias ibus-en='ibus engine xkb:us:intl:eng'
alias ibus-vn='ibus engine Bamboo' alias ibus-vn='ibus engine Bamboo'
# export GTK_IM_MODULE=ibus # --- Aliases: nvidia ---
# export QT_IM_MODULE=ibus alias enable-nvidia='export __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia'
# export XMODIFIERS=@im=ibus
export XMODIFIERS=@im=fcitx
# export GTK_IM_MODULE=fcitx
# export QT_IM_MODULE=fcitx
export GPG_TTY=$(tty)
# bun completions
[ -s "/home/antoine/.bun/_bun" ] && source "/home/antoine/.bun/_bun"
# bun
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
# Added by Nix installer:
# if [ -e /home/antoine/.nix-profile/etc/profile.d/nix.sh ]; then . /home/antoine/.nix-profile/etc/profile.d/nix.sh; fi
export NVM_DIR="$HOME/.nvm"
alias snvm='[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"'
# [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# MATLAB
alias matlab="enable-nvidia && /usr/bin/matlab -nosoftwareopengl"
# --- Aliases: misc ---
alias cal='cal -m'
alias bruh="echo 'bruh' | cowsay" alias bruh="echo 'bruh' | cowsay"
alias pecha="sleep 20 && echo \"KUCHA\""
alias intellij="exec $HOME/Applications/idea-IU-252.26830.84/bin/idea &"
# alias start_conda='source $HOME/antoine/anaconda3/bin/activate' # --- Aliases: bun ---
# source /usr/share/nvm/init-nvm.sh
alias ip="ip --color"
# Aliases for bun (bun.sh)
alias brd="bun run dev" alias brd="bun run dev"
alias bi="bun install" alias bi="bun install"
alias ba="bun add" alias ba="bun add"
@@ -169,31 +100,12 @@ alias brp="bun run preview"
alias brl="bun run lint" alias brl="bun run lint"
alias brf="bun run format" alias brf="bun run format"
alias pecha="sleep 20 && echo \"KUCHA\"" # --- Aliases: docker ---
# The next line updates PATH for the Google Cloud SDK.
if [ -f '/home/antoine/Downloads/google-cloud-sdk/path.zsh.inc' ]; then . '/home/antoine/Downloads/google-cloud-sdk/path.zsh.inc'; fi
# The next line enables shell command completion for gcloud.
if [ -f '/home/antoine/Downloads/google-cloud-sdk/completion.zsh.inc' ]; then . '/home/antoine/Downloads/google-cloud-sdk/completion.zsh.inc'; fi
# CD Player
alias playcd='cdda2wav -D /dev/sr0 -t 1+ -B - | pw-play --rate 44100 --quality 15 -'
# Load Angular CLI autocompletion.
# source <(ng completion script)
# . "$HOME/.local/bin/env"
alias dcb="docker compose build" alias dcb="docker compose build"
alias dcu="docker compose up" alias dcu="docker compose up"
alias dcud="docker compose up -d" alias dcud="docker compose up -d"
alias dcd="docker compose down" alias dcd="docker compose down"
alias dcuw="docker compose up --watch" alias dcuw="docker compose up --watch"
alias intellij="exec $HOME/Applications/idea-IU-252.26830.84/bin/idea &" # --- Tools ---
alias mirror="wl-mirror $(niri msg --json focused-output | jq -r .name)"
eval "$(zoxide init --cmd cd zsh)" eval "$(zoxide init --cmd cd zsh)"
export PATH="$HOME/.local/bin:$PATH"

191
zsh/.zshrc.full Normal file
View File

@@ -0,0 +1,191 @@
export ZSH="$HOME/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
# gnzh jtriley juanghurtado kphoen
ZSH_THEME="kphoen"
# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in $ZSH/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=()
# CASE_SENSITIVE="true"
# HYPHEN_INSENSITIVE="true"
# Auto-update behaviour:
# - auto: update automatically without asking
# - disabled: disable automatic update
# - reminder: remind to update when it's time
zstyle ':omz:update' mode auto
# Change how often to auto-update (in days).
# zstyle ':omz:update' frequency 13
# Uncomment the following line if pasting URLs and other text is messed up.
DISABLE_MAGIC_FUNCTIONS="false"
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
DISABLE_AUTO_TITLE="false"
# Uncomment the following line to enable command auto-correction.
ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# You can also set it to another string to have that shown instead of the default red dots.
# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f"
COMPLETION_WAITING_DOTS="%F{yellow}....hmm..."
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# Or use strftime format for date+time, e.g. "%Y-%m-%d %H:%M"
# see 'man strftime' for details.
HIST_STAMPS="%Y-%m-%d -- %H:%M"
# ZSH_CUSTOM=/path/to/new-custom-folder
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
plugins=(
git
zsh-autosuggestions
zsh-syntax-highlighting
archlinux
sudo
ufw
tmux
kubectl
minikube
)
source $ZSH/oh-my-zsh.sh
# export MANPATH="/usr/local/man:$MANPATH"
# Compilation flags
export ARCHFLAGS="-arch x86_64"
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
export LC_ALL=en_CA.UTF-8
# Starting a session from the TTY
# if [ -z $DISPLAY ] && [ $(tty) = /dev/tty1 ]
#then
# Autostart Hyprland
# export GTK_THEME=adw-gtk3-dark:dark
# exec Hyprland
# elif [ -z $DISPLAY ] && [ $(tty) = /dev/tty2 ]
# then
# Autostart X at login for tty2, using i3 WM
# export GTK_THEME=adw-gtk3-dark:dark
# exec startx
#fi
# In case I need to enable NVIDIA from start
# export __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia
export EDITOR=nvim
# Jack config for SuperCollider server
export SC_JACK_DEFAULT_INPUTS="system:capture_1,system:capture_2"
export SC_JACK_DEFAULT_OUTPUTS="system:playback_1,system:playback_2"
# Android Studio and Android SDK
export CAPACITOR_ANDROID_STUDIO_PATH="/usr/bin/android-studio"
export ANDROID_SDK_ROOT="$HOME/Android/Sdk"
export ANDROID_HOME="$HOME/Android/Sdk"
alias SHUTDOWN="shutdown now"
alias connectWifi='sudo wpa_supplicant -B -i wlo1 -c /etc/wpa_supplicant/wpa_supplicant.conf'
alias project='cd ~/Partage/Projects/'
alias coding='cd $HOME/Partage/Coding'
alias gotop="gotop -l kitchensink --nvidia"
alias setbackground="feh --bg-fill --randomize $HOME/.wallpaper/"
alias fallinlight="feh --bg-fill --randomize /home/antoine/Pictures/Fallin\'\ Light"
alias micvol="wpctl set-volume @DEFAULT_SOURCE@"
alias enable-nvidia='export __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia'
alias weather="curl https://wttr.in"
alias cal='cal -m'
alias please='sudo'
alias ibus-en='ibus engine xkb:us:intl:eng'
alias ibus-vn='ibus engine Bamboo'
# export GTK_IM_MODULE=ibus
# export QT_IM_MODULE=ibus
# export XMODIFIERS=@im=ibus
export XMODIFIERS=@im=fcitx
# export GTK_IM_MODULE=fcitx
# export QT_IM_MODULE=fcitx
export GPG_TTY=$(tty)
# bun completions
[ -s "/home/antoine/.bun/_bun" ] && source "/home/antoine/.bun/_bun"
# bun
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
# Added by Nix installer:
# if [ -e /home/antoine/.nix-profile/etc/profile.d/nix.sh ]; then . /home/antoine/.nix-profile/etc/profile.d/nix.sh; fi
export NVM_DIR="$HOME/.nvm"
alias snvm='[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"'
# [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# alias start_conda='source $HOME/antoine/anaconda3/bin/activate'
# source /usr/share/nvm/init-nvm.sh
alias ip="ip --color"
# Aliases for bun (bun.sh)
alias brd="bun run dev"
alias bi="bun install"
alias ba="bun add"
alias brb="bun run build"
alias brp="bun run preview"
alias brl="bun run lint"
alias brf="bun run format"
alias pecha="sleep 20 && echo \"KUCHA\""
# The next line updates PATH for the Google Cloud SDK.
if [ -f '/home/antoine/Downloads/google-cloud-sdk/path.zsh.inc' ]; then . '/home/antoine/Downloads/google-cloud-sdk/path.zsh.inc'; fi
# The next line enables shell command completion for gcloud.
if [ -f '/home/antoine/Downloads/google-cloud-sdk/completion.zsh.inc' ]; then . '/home/antoine/Downloads/google-cloud-sdk/completion.zsh.inc'; fi
# CD Player
alias playcd='cdda2wav -D /dev/sr0 -t 1+ -B - | pw-play --rate 44100 --quality 15 -'
# Load Angular CLI autocompletion.
# source <(ng completion script)
# . "$HOME/.local/bin/env"
alias dcb="docker compose build"
alias dcu="docker compose up"
alias dcud="docker compose up -d"
alias dcd="docker compose down"
alias dcuw="docker compose up --watch"
alias mirror="wl-mirror $(niri msg --json focused-output | jq -r .name)"
eval "$(zoxide init --cmd cd zsh)"
export PATH="$HOME/.local/bin:$PATH"