From 2c6f54db549bac89043a61ee9c0f097782f7cf5a Mon Sep 17 00:00:00 2001 From: cabbbyy Date: Sat, 9 Aug 2025 23:50:38 +0800 Subject: [PATCH] added .zshrc --- .zshrc | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .zshrc diff --git a/.zshrc b/.zshrc new file mode 100644 index 0000000..d0424b5 --- /dev/null +++ b/.zshrc @@ -0,0 +1,61 @@ +# cute bunny +printf '\33c\e[3J' +printf "($(tput setaf 4)\\$(tput sgr0)($(tput setaf 4)\\$(tput sgr0) \n( o$(tput setaf 1).$(tput sgr0)o) \no($(tput setaf 1)\"$(tput sgr0))($(tput setaf 1)\"$(tput sgr0))\n\n" + +# exports +PATH=${PATH}:$HOME/.bin +export "EDITOR=nvim" + +# colors and ps1 prompt +autoload -U colors && colors # Load colors +PROMPT="[%n@%f%m %F{red}%~%f ]% :> " +setopt autocd # Automatically cd into typed directory. +zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' # cd case insensitive +stty stop undef # Disable ctrl-s to freeze terminal. +setopt interactive_comments +# Basic auto/tab complete: +autoload -U compinit +zstyle ':completion:*' menu select +zmodload zsh/complist +compinit +_comp_options+=(globdots) # Include hidden files. + +# color alias +alias grep='grep --color=auto' +alias diff='diff --color=auto' +alias ls='lsd' +alias la='lsd -a' +alias lls='lsd -l' +alias lla='lsd -la' +alias cp='cp -i' +alias rm='rm -i' +alias df='df -h' +alias du='du -hs' +alias mkdir='mkdir -pv' +alias ccd='cd "$(find ~/.bin ~/.config ~/Desktop ~/Documents ~/Downloads ~/Movies ~/Music ~/Pictures -type d | fzf --exact)"' +alias v='vim "$(find ~/.bin ~/.config ~/Desktop ~/Documents ~/Downloads ~/Movies ~/Music ~/Pictures | fzf --exact)"' +alias q='exit' +alias c='clear' +alias f='fastfetch' +alias vim='nvim' +[ "$TERM" = "xterm-kitty" ] && alias ssh="kitty +kitten ssh" +alias n='nnn -C' +alias portfolio='rsync -uvrP --delete-after ~/Documents/Websites/portfolio/ cab@rchou.org:/home/cab/.dock/portfolio/src/' +alias maps='rsync -uvrP --delete-after ~/Documents/Websites/maps/ cab@rchou.org:/home/cab/.dock/maps/src/' +alias blog='rsync -uvrP --delete-after ~/Documents/Websites/blog/ cab@rchou.org:/home/cab/.dock/blog/src/' +alias ttest='rsync -uvrP --delete-after ~/Documents/Websites/test/ cab@rchou.org:/home/cab/.dock/test/' +alias yingy='rsync -uvrP --delete-after ~/Documents/Websites/yingy/ cab@rchou.org:/home/cab/.dock/yingy/src/' + +# hw +alias hw='cd ~/Documents/HW/cse114a' +alias grade='source ~/Documents/HW/cse114a/cse114a_venv/bin/activate' +alias p='python3' +alias pp='pip3' +alias vact='source venv/bin/activate' +alias vdact='deactivate' +alias submit='python3 -m autograder.run.submit INTEGRITY.md tests/* --user rchou2@ucsc.edu --pass e2232775843753a630b2a5d372d44d07 --course cse-114a-spring25' + +alias albums='echo $(ls * | grep -c "jpg") albums' +alias songs='echo $(ls * | grep -c "flac") songs' + +[ -f "/Users/cabby/.ghcup/env" ] && . "/Users/cabby/.ghcup/env" # ghcup-env