Skip to content

Instantly share code, notes, and snippets.

@damienstanton
Last active March 28, 2025 17:59
Show Gist options
  • Save damienstanton/e69c21f33b589832402a697ee66f5ea1 to your computer and use it in GitHub Desktop.
Save damienstanton/e69c21f33b589832402a697ee66f5ea1 to your computer and use it in GitHub Desktop.
ZSH Profile 2025
# ╔════╗
# ║ DS ║
# ╚════╝
# version: 2025.02
# section: config
eval "$(/opt/homebrew/bin/brew shellenv)"
COMPLETION_WAITING_DOTS="true"
KEYTIMEOUT=1
plugins=(git
dirhistory
docker
git-extras
gradle
node
npm
macos
pip
sudo
wd
vi-mode
zsh-autosuggestions
)
# end
# section: exports
export EDITOR="code -r"
export GIT_EDITOR="code --wait"
export TERM="xterm-256color"
export ZSH=$HOME/.oh-my-zsh
export FZF_DEFAULT_COMMAND="fd --type file --color=always"
export ANDROID_HOME="$HOME/Library/Android/sdk"
export NDK_HOME="$ANDROID_HOME/ndk/28.0.12916984"
# end
# section: paths
export PATH="$HOME/bin:$PATH"
export PATH="$HOME/.local/bin:$PATH"
export PATH="$HOME/go/bin:$PATH"
export PATH="$HOME/.ghcup/bin:$PATH"
export PATH="$HOME/.cabal/bin:$PATH"
export PATH="/opt/homebrew/opt/bison/bin:$PATH"
export PATH="$HOME/flutter/bin:$PATH"
export PATH="$HOME/code/research/fs/fstar/fstar_src/bin:$PATH"
export PATH="/Users/damien/.dotnet/tools:$PATH"
# end
# section: aliases
alias reload="source $HOME/.zshrc"
alias vimconf="$EDITOR $HOME/.config/nvim/init.vim"
alias zshconf="$EDITOR $HOME/.zshrc"
alias tmuxconf="$EDITOR $HOME/.tmux.conf"
alias termconf="$EDITOR $HOME/.alacritty.yml"
alias starshipconf="$EDITOR $HOME/.config/starship.toml"
alias g="git"
alias cat="bat --theme gruvbox-dark"
alias e="$EDITOR"
alias gs="git status"
alias push="git push"
alias pull="git pull --rebase"
alias ls="exa"
alias c="clear; exa -l -s mod --header -t=mod --time-style=long-iso --git"
alias ct="clear; exa -l --header -t=mod --time-style=long-iso --tree --level=2 --git"
alias peek="exa -l --header -t=mod --time-style=long-iso --tree --level=2 --git"
alias sub="git submodule update --init --recursive"
alias up="brew update && brew upgrade && npm i -g npm && npm update -g && rustup update && cabal update"
alias rff="rm -rf"
alias k="kubectl"
alias listening="lsof -P | rg LISTEN"
alias gdiff="git difftool --no-prompt"
alias please="sudo"
alias sorry='sudo (fc -ln -1)'
alias glog="git log --oneline --decorate --graph"
alias ee="code -r"
alias reloadmux="tmux source-file $HOME/.tmux.conf"
alias i="ipython"
alias ta="tmux attach-session -t 0"
# end
# section: functions
mkcd() {
mkdir -p "$@" && cd "$@"
}
commit() {
git add -A
git commit
git push
}
copyright() {
cat > LICENSE <<EOF
"The MIT License (MIT) Copyright © $(date +%Y) $(git config user.name)"
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
EOF
cat LICENSE
}
# end
# section: sources
eval "$(starship init zsh)"
source $HOME/.oh-my-zsh/oh-my-zsh.sh
[ -f $HOME/.fzf.zsh ] && source $HOME/.fzf.zsh
# end
# BEGIN opam configuration
# This is useful if you're using opam as it adds:
# - the correct directories to the PATH
# - auto-completion for the opam binary
# This section can be safely removed at any time if needed.
[[ ! -r '/Users/damien/.opam/opam-init/init.zsh' ]] || source '/Users/damien/.opam/opam-init/init.zsh' > /dev/null 2> /dev/null
# END opam configuration
command_timeout = 10_000
[directory]
home_symbol = "∈ "
[character]
success_symbol = "[ω.](bold green)"
error_symbol = "[ω.](bold red)"
[git_status]
conflicted = "x"
ahead = '[>\($count\)](green)'
behind = '[<\($count\)](yellow)'
diverged = "d"
untracked = "?"
stashed = "s"
modified = "m"
staged = '[+\($count\)](green)'
renamed = "r"
deleted = "d"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment