dotfiles/dot_config/zsh/dot_zshrc
Joel Beckmeyer 15bf832b30 keychain: improve
- don't set pinentry manually, let local system manage it
- update cache-ttls to improve longevity
2024-02-21 17:11:35 -05:00

70 lines
2.0 KiB
Plaintext

### This configuration makes zsh fully "XDG compliant". One change is needed to
### /etc/zsh/zshenv (or equivalent upstream profile):
### `export ZDOTDIR="$HOME"/.config/zsh`
#
# Lines configured by zsh-newuser-install
export HISTFILE="$XDG_STATE_HOME"/zsh/history
mkdir -p "$(dirname "$HISTFILE")"
HISTSIZE=100000
SAVEHIST=100000
setopt autocd
unsetopt beep
bindkey -v
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle :compinstall filename "$ZDOTDIR/.zshrc"
autoload -Uz compinit
compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-"$ZSH_VERSION"
# End of lines added by compinstall
### User configuration
# for shell integration
precmd() {
print -Pn "\e]133;A\e\\"
}
# prompt configuration
autoload -Uz vcs_info
precmd_vcs_info () { vcs_info }
precmd_functions+=( precmd_vcs_info )
setopt prompt_subst
zstyle ':vcs_info:*' formats ' %F{green}%b'
PROMPT='%F{yellow}%n@%m %F{white}%1~%(?.. %?) $ '
RPROMPT='%f$vcs_info_msg_0_ '
alias adb='HOME="$XDG_DATA_HOME"/android adb'
alias boinctui='boinctui --boinchost=localhost'
alias bt='bluetoothctl'
alias c='clear'
alias daybreak='mosh daybreak -p 60101'
alias epoch='mosh epoch -p 60104'
alias grc='gridcoinresearchd'
alias l='eza -lh --git --all --octal-permissions'
alias less='less -r'
alias ls='eza'
alias lsa='eza -a'
alias lss='eza -a'
alias vim='nvim'
alias wake_circadian='ssh epoch wol a8:a1:59:11:06:f1'
alias xrm='sudo xbps-remove'
# GPG setup (and SSH)
if command -v keychain >/dev/null; then
alias keychain="keychain --absolute --dir $XDG_RUNTIME_DIR"
eval "$(keychain --quick --quiet --eval --agents gpg D7F966B85D985743C76A17AC5A9572AE7B2E7E1C)"
fi
if command -v gpgconf >/dev/null; then
SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
export SSH_AUTH_SOCK
fi
### End user configuration
### hooks/includes
for plugin in zsh-history-substring-search zsh-autosuggestions \
zsh-syntax-highlighting; do
if [ -f /usr/share/zsh/plugins/$plugin/${plugin}.zsh ]; then
. /usr/share/zsh/plugins/$plugin/${plugin}.zsh
fi
done