Skip to content

Instantly share code, notes, and snippets.

Last active April 18, 2024 09:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sorcererxw/238f7068c18ba148337f32f9a08d0dbd to your computer and use it in GitHub Desktop.
Save sorcererxw/238f7068c18ba148337f32f9a08d0dbd to your computer and use it in GitHub Desktop.
My .zshrc file
# init homebrew
if [[ "$(uname)" == "Linux" ]]; then
export HOMEBREW_PREFIX="/home/linuxbrew/.linuxbrew"
elif [[ "$(uname -m)" == "arm64" ]]; then
export HOMEBREW_PREFIX="/opt/homebrew"
export HOMEBREW_PREFIX="/usr/local"
eval "$($HOMEBREW_PREFIX/bin/brew shellenv)"
# init zsh
source $HOMEBREW_PREFIX/share/antigen/antigen.zsh
antigen use oh-my-zsh
antigen bundle git
antigen bundle zoxide
antigen bundle direnv
antigen bundle urltools
antigen bundle encode64
antigen bundle command-not-found
antigen bundle zsh-users/zsh-completions
antigen bundle zsh-users/zsh-autosuggestions
antigen bundle zsh-users/zsh-syntax-highlighting
antigen bundle dominik-schwabe/zsh-fnm
antigen theme sorcererxw/banana-zsh-theme
antigen apply
# init krb5
export PATH=$(brew --prefix krb5)/bin:$PATH
export PATH=$(brew --prefix krb5)/sbin:$PATH
# init golang
export GOROOT="$(brew --prefix go)/libexec"
export PATH=$PATH:$(go env GOPATH)/bin
export GOPRIVATE="*"
# [[ -s ~/.gvm/scripts/gvm ]] && source ~/.gvm/scripts/gvm
# init pnpm
export PNPM_HOME=$HOME/Library/pnpm
# devbox
[[ -s /opt/tiger/ss_bin ]] && export PATH=$PATH:/opt/tiger/ss_bin
# command alias
alias ls=eza
alias vi=nvim
alias vim=nvim
alias ack=rg
alias cat="bat --theme Dracula"
alias cloc=tokei
alias gmo='go list -u -m -json all | go-mod-outdated'
alias gmod='go list -u -m -json all | go-mod-outdated -direct'
alias gmodu='go list -u -m -json all | go-mod-outdated -direct -update'
alias gmou='go list -u -m -json all | go-mod-outdated -update'
alias help=tldr
alias k=kubectl
alias lg=lazygit
# alias rm=rip
alias dontsleep="caffeinate -s"
alias video_to_gif='function video_to_gif(){ ffmpeg -i $1 output.gif && gifsicle -O3 output.gif -o output.gif && say "Video is ready!"};video_to_gif'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment