dotfiles/zshrc

69 lines
2.0 KiB
Bash
Raw Normal View History

2019-11-26 14:18:41 -05:00
#source $HOME/.aliases
2017-06-19 00:49:00 -04:00
# Set TERM for proper tmux colors
2017-11-18 10:07:28 -05:00
if [[ -z $TMUX ]]; then
2019-11-26 14:18:41 -05:00
export TERM='xterm-256color'
2017-11-18 10:07:28 -05:00
else
2019-11-26 14:18:41 -05:00
export TERM='screen-256color'
2017-11-18 10:07:28 -05:00
fi
2019-08-25 11:04:01 -04:00
# Customl binaries
2017-11-18 02:41:10 -05:00
export PATH=$HOME/.local/bin:$PATH
2019-08-25 14:11:08 -04:00
export PATH=$HOME/.cargo/bin:$PATH
export GOPATH=$HOME/go
2019-08-25 14:11:08 -04:00
export PATH=$HOME/.local/share/flatpak/exports/bin:$PATH
export PATH=$HOME/.local/minecraft-launcher:$PATH
# ZSH
2017-11-18 02:29:25 -05:00
export ZSH=$HOME/.oh-my-zsh
2019-11-26 14:18:41 -05:00
ZSH_THEME='steeef'
plugins=(git history-substring-search docker docker-compose)
2017-06-19 00:49:00 -04:00
source $ZSH/oh-my-zsh.sh
## Keybindings
2017-11-15 22:38:50 -05:00
bindkey '^K' history-beginning-search-backward
bindkey '^J' history-beginning-search-forward
2017-11-15 21:53:39 -05:00
bindkey '^w' backward-kill-word
2018-06-12 23:27:26 -04:00
bindkey '\e[2~' insert-last-word
if [ -f /etc/os-release ]; then
2019-11-26 14:18:41 -05:00
. /etc/os-release
if [ "$ID" = 'rhel' ]; then
bindkey '\e[1~' beginning-of-line
bindkey '\e[4~' end-of-line
fi
fi
2017-11-18 02:10:59 -05:00
# GPG/SSH
## Void: Install pcsclite, pcsc-ccid, gnupg2-scdaemon
2019-08-31 12:27:54 -04:00
## Yubico openpgp: https://support.yubico.com/support/solutions/articles/15000006420-using-your-yubikey-with-openpgp
2019-12-05 13:01:55 -05:00
# Run if ALL variables are not set
if [ -z "$SSH_CONNECTION" ] && [ -z "$SSH_CLIENT" ] && [ -z "$SSH_TTY" ]; then
2019-11-26 14:18:41 -05:00
if [[ "$OSTYPE" == 'darwin'* ]]; then
eval `ssh-agent`
ssh-add -t 48h -s $OPENSC_LIBS/opensc-pkcs11.so
fi
2019-12-05 12:18:35 -05:00
if [[ "$OSTYPE" != 'darwin'* || ("$?" != '0' && "$OSTYPE" == 'darwin'*) ]]; then
unset SSH_AGENT_PID
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
fi
export GPG_TTY=$(tty)
gpg-connect-agent updatestartuptty /bye >/dev/null
2019-11-26 14:18:41 -05:00
fi
fi
if [[ "$OSTYPE" == 'darwin'* ]]; then
export CLICOLOR=YES
export PATH=/usr/local/opt/python/libexec/bin:$PATH
export PATH=/usr/local/opt/ncurses/bin:$PATH
export PATH=$PATH:$HOME/.linkerd2/bin
export OPENSC_LIBS=/usr/local/lib
source $HOME/.cargo/env
elif [[ "$OSTYPE" == 'linux-gnu' ]]; then
eval `dircolors ~/.config/dircolors-solarized/dircolors.256dark`
fi
2019-03-17 12:31:13 -04:00
# VIM
## Reduce delay swithing between normal & insert mode
export KEYTIMEOUT=1