.zshrc (3970B)
1 # Plugins 2 source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh 3 autoload -Uz +X compinit && compinit 4 5 ## case insensitive path-completion 6 zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 7 zstyle ':completion:*' menu select 8 9 # Exports and Alias 10 # History configurations 11 HISTFILE=~/.zsh_history 12 HISTSIZE=100000 13 SAVEHIST=200000 14 15 # force zsh to show the complete history 16 alias history="history 0" 17 18 # Some more ls aliases 19 alias ll='ls -la' 20 alias la='ls -A' 21 alias l='ls -CF' 22 alias ld='du -h -d 1' 23 alias nv='nvim' 24 alias neo='clear' 25 alias noe='neo' 26 alias cls='clear; fastfetch' 27 alias tr='tree -Ld 1' 28 alias trf='tree -I '.git' -I 'out' -L 2' 29 alias x='exit' 30 alias nvc='cd ~/dotfiles/nvim && nv' 31 alias cd='z' 32 33 # Zig environment variables 34 export PATH="$PATH:$HOME/zig/bin" 35 36 # Go via Nix 37 export GOPATH="$HOME/go" 38 export PATH="$PATH:$GOPATH/bin" 39 40 41 # Elixir env 42 export PATH="$HOME/.mix/escripts:$PATH" 43 # Elixir install (official installer) 44 # NVM Variables 45 export NVM_DIR="$HOME/.nvm" 46 [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # Load NVM 47 [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # Load NVM bash_completion (optional) 48 export PATH="$HOME/.npm-global/bin:$PATH" 49 50 # Neovim Variables 51 export PATH="$PATH:/opt/nvim-linux-x86_64/bin" 52 53 # Path for custom scripts 54 export PATH="$HOME/bin:$PATH" 55 export PATH="$HOME/.local/bin:$PATH" 56 alias tm='start_tmux' 57 alias arise='ssh Igris' 58 59 export LC_ALL=C.UTF-8 60 61 # Git aliases 62 alias gitupd='git add .; git commit -m "upd"; git push' 63 alias gitnew='git add .; git commit -m "new"; git push' 64 alias gitadd='git add .; git commit -m "add"; git push' 65 alias gitfix='git add .; git commit -m "fix"; git push' 66 alias gitrebase='git pull --rebase' 67 alias gitbat='git add .; git commit -m "Batman"; git push' 68 alias ga="git add .;" 69 alias gc="git commit -m" 70 alias gp="git push" 71 alias gpall="git remote | xargs -L1 git push" 72 73 # bun completions 74 [ -s "/home/dracuxan/.bun/_bun" ] && source "/home/dracuxan/.bun/_bun" 75 76 # bun 77 export BUN_INSTALL="$HOME/.bun" 78 export PATH="$BUN_INSTALL/bin:$PATH" 79 80 # cargo 81 export PATH="/home/dracuxan/.cargo/bin:$PATH" 82 83 # Python alias 84 alias py='python3' 85 86 # Nuclei alias 87 alias nuke='nuclei' 88 alias ff='firefox' 89 90 # codex alias 91 alias cr='codex resume' 92 93 # alacrity configurations 94 alias alacritty_conf='nv /mnt/c/Users/Nisarg/AppData/Roaming/alacritty/alacritty.toml' 95 96 # Solana environment Variables 97 alias anchor="LD_LIBRARY_PATH=$HOME/glibc-2.39/local/lib:$LD_LIBRARY_PATH anchor" 98 PATH="/home/dracuxan/.local/share/solana/install/active_release/bin:$PATH" 99 100 # Metasploit variables 101 export PATH="$PATH:/opt/metasploit-framework/bin" 102 103 # nix alias 104 alias nix-system-add='sudo nix profile add --profile /nix/var/nix/profiles/system' 105 alias nix-system-upgrade='sudo nix profile upgrade --profile /nix/var/nix/profiles/system dotfiles' 106 alias nix-system-profile='sudo nix profile list --profile /nix/var/nix/profiles/system' 107 108 # Nix system profile (required for Debian + Nix) 109 export PATH=/nix/var/nix/profiles/system/bin:$PATH 110 111 # Startup Commands 112 [ -f ~/.chatgpt.env ] && source ~/.chatgpt.env 113 eval "$(starship init zsh)" 114 115 if [[ -n "$IN_NIX_SHELL" ]]; then 116 PROMPT="(nix-shell) $PROMPT" 117 fi 118 119 export POLYBAR_COLLECTION="/home/dracuxan/debian-dots/polybar" 120 export POLYBAR_BATTERY_ADP="ACAD" 121 export POLYBAR_BATTERY_BAT="BAT1" 122 export POLYBAR_WIRELESS="wlan0" 123 export POLYBAR_WIRED="enp3s0" 124 export POLYBAR_WEATHER_API="46276f91dcb44de4ac0134024262101" 125 126 # opencode 127 export PATH=/home/dracuxan/.opencode/bin:$PATH 128 . /etc/profile.d/nix.sh 129 eval "$(zoxide init zsh)" 130 export PATH=$HOME/.npm-global/bin:$PATH 131 132 export GPG_TTY=$(tty) 133 134 export PATH="/home/dracuxan/.pixi/bin:$PATH" 135 . "$HOME/.asdf/asdf.sh" 136 137 preexec() { LAST_CMD="$1" } 138 precmd() { 139 local exclude=("ls" "cd" "source" "clear" "x" "neo" "noe" "nv" "cls" "tm" "git" "lazygit" "vim" "cat") 140 local cmd_base="${LAST_CMD%% *}" 141 142 if [[ -n "$LAST_CMD" ]] && [[ ! " ${exclude[@]} " =~ " ${cmd_base} " ]]; then 143 dunstify "command completed: $LAST_CMD" 144 fi 145 LAST_CMD="" 146 }