Files
dotfiles/zsh/.zshrc

107 lines
3.1 KiB
Bash
Raw Permalink Normal View History

2024-01-11 14:15:49 -05:00
# If you come from bash you might have to change your $PATH.
export GOPATH="$HOME/.go"
export PATH=$HOME/.bin:$HOME/var/bin:/usr/local/bin:$PATH:$HOME/.go/bin:$HOME/.local/bin
2026-03-02 13:59:43 -05:00
export GIT_CU_DIR="$HOME/src"
2024-01-11 14:15:49 -05:00
export ZSH="$HOME/.oh-my-zsh"
export GPG_TTY=$(tty)
export SSH_ASKPASS="$HOME/.local/bin/ssh-askpass-load-keys"
2026-07-28 11:01:46 -04:00
export SSH_ASKPASS_REQUIRE=""
2026-03-08 17:50:13 -04:00
# This is a hack to make poetry not hang
export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
2026-03-13 11:12:02 -04:00
load_keys &>/dev/null
2024-01-11 14:15:49 -05:00
ZSH_THEME="robbyrussell"
plugins=(git z fzf asdf direnv emacs yarn aws)
2024-01-11 14:15:49 -05:00
source $ZSH/oh-my-zsh.sh
2026-02-09 16:01:01 -05:00
create_email() {
2026-01-08 15:40:15 -05:00
curl -X POST --user colin@unbl.ink:$(pass personal/colin@unbl.ink | head -n 1) -d "address=$1@unbl.ink" -d "forwards_to=colin@unbl.ink" https://box.unbl.ink/admin/mail/aliases/add
2024-01-16 18:55:52 -05:00
}
2026-02-09 16:01:01 -05:00
eosup() {
2026-01-08 15:40:15 -05:00
mv ~/.asdf ~/.asdf.bak
2026-02-09 16:01:01 -05:00
yay -Ss
2026-01-08 15:40:15 -05:00
yay -S --noconfirm archlinux-keyring endeavouros-keyring
yay -Syu --noconfirm
mv ~/.asdf.bak ~/.asdf
2024-01-15 10:06:27 -05:00
}
2026-02-09 16:01:01 -05:00
# quick way to fix clock drift in UTM VM
toggle_ntp() {
2026-02-27 11:34:24 -05:00
timedatectl set-ntp "$(
timedatectl show -p NTP --value | grep -qi '^yes$' && echo false || echo true
)"
2026-02-09 16:01:01 -05:00
}
alias fixtime="toggle_ntp && toggle_ntp"
2024-03-08 18:52:04 -05:00
local hostname="%{$fg_bold[white]%}%m"
PROMPT="${hostname} ${PROMPT}"
2025-02-07 13:12:14 -05:00
## [Completion]
## Completion scripts setup. Remove the following line to uninstall
[[ -f /home/powellc/.dart-cli-completion/zsh-config.zsh ]] && . /home/powellc/.dart-cli-completion/zsh-config.zsh || true
## [/Completion]
export PATH="/home/powellc/.shorebird/bin:$PATH"
export PATH="${ASDF_DATA_DIR:-$HOME/.asdf}/shims:$PATH"
2025-10-01 10:22:47 -04:00
export TERM=xterm-256color
export EDITOR=vim
export VISUAL="$EDITOR"
2026-01-08 15:40:15 -05:00
2026-03-13 18:13:20 -04:00
# SSH_AUTH_SOCK - common locations for Linux and macOS
for sock in "$SSH_AUTH_SOCK" "$XDG_RUNTIME_DIR/ssh-agent.socket" "/run/user/1000/ssh-agent.socket"; do
[[ -S "$sock" ]] && export SSH_AUTH_SOCK="$sock" && break
done
2026-01-08 15:40:15 -05:00
case "$(uname -s)" in
Linux)
2026-03-02 13:22:51 -05:00
[[ -d "/home/linuxbrew/.linuxbrew/bin" ]] && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
2026-01-08 15:40:15 -05:00
;;
Darwin)
eval "$(/opt/homebrew/bin/brew shellenv)"
;;
esac
2026-02-11 16:13:14 -05:00
[[ -d "/home/linuxbrew/.linuxbrew/bin" ]] && export PATH=/home/linuxbrew/.linuxbrew/bin:$PATH
2026-01-08 15:40:15 -05:00
eval "$(direnv hook /bin/zsh)"
2026-01-26 17:39:23 -05:00
. ${ASDF_DATA_DIR:-$HOME/.asdf}/plugins/golang/set-env.zsh &>/dev/null
2026-02-09 16:01:01 -05:00
# opencode
2026-02-27 11:36:13 -05:00
[[ -d "$HOME/.npm-global" ]] && export PATH="$HOME/.npm-global/bin":$PATH
[[ -d "$HOME/.local/opencode/bin" ]] && export PATH="$HOME/.local/opencode/bin":$PATH
[[ -d "$HOME/.opencode/bin" ]] && export PATH="$HOME/.opencode/bin":$PATH
2026-02-09 16:01:01 -05:00
export LIFE_API_KEY=$(pass show personal/apikey/vrobbler)
export ANTHROPIC_API_KEY=$(pass show work/hungryroot/apikeys/anthropic)
2026-02-09 16:01:01 -05:00
# See ~/.aliases for the various aliases seen in here
source "$HOME/.aliases"
2026-03-12 14:13:40 -04:00
# Added by LM Studio CLI (lms)
export PATH="$PATH:/home/powellc/.lmstudio/bin"
# End of LM Studio CLI section
2026-07-15 12:49:24 -04:00
export OLLAMA_HOST=0.0.0.0
export VOLTA_HOME="$HOME/.volta"
export PATH="$VOLTA_HOME/bin:$PATH"
2026-07-30 10:38:17 -04:00
export ANDROID_HOME="$HOME/android-sdk"
export PATH="$PATH:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools"
fpath+=~/.zfunc; autoload -Uz compinit; compinit
zstyle ':completion:*' menu select
2026-09-17 11:12:43 -04:00
# opencode
export PATH=/home/powellc/.opencode/bin:$PATH