dotfiles/dot_zshrc

73 lines
1.4 KiB
Plaintext
Raw Normal View History

# vim: set ft=zsh:
2022-03-07 19:24:20 +01:00
# History
HISTFILE=~/.histfile
2019-09-03 10:31:51 +02:00
HISTSIZE=40000
SAVEHIST=40000
2021-09-29 02:56:36 +02:00
HIST_STAMPS="yyyy-mm-dd"
2019-06-08 01:46:49 +02:00
setopt HIST_IGNORE_DUPS
2022-03-07 19:24:20 +01:00
# oh-my-zsh
2021-09-29 02:56:36 +02:00
export ZSH="$HOME/.config/zsh/oh-my-zsh"
2022-03-07 19:24:20 +01:00
CUSTOM="$HOME/.config/zsh"
2022-04-30 01:47:47 +02:00
ZSH_THEME="boban/boban"
2021-09-29 02:56:36 +02:00
HYPHEN_INSENSITIVE="true"
DISABLE_AUTO_UPDATE="true"
plugins=(
archlinux
common-aliases
2023-05-12 09:40:53 +02:00
docker
docker-compose
2021-09-29 02:56:36 +02:00
git
2021-10-14 10:06:39 +02:00
kubectl
2021-09-29 02:56:36 +02:00
you-should-use
zsh-autosuggestions
2021-10-10 13:00:28 +02:00
zsh-autoswitch-virtualenv
2021-09-29 02:56:36 +02:00
zsh-completions
zsh-syntax-highlighting
)
source $ZSH/oh-my-zsh.sh
2019-06-08 01:46:49 +02:00
2022-03-07 19:24:20 +01:00
# Custom functions
fpath=( ${CUSTOM}/functions "${fpath[@]}" )
autoload -Uz ${CUSTOM}/functions/*
2019-06-08 01:46:49 +02:00
2022-04-13 23:45:08 +02:00
zle_highlight+=(paste:none)
2021-07-31 12:03:59 +02:00
# Misc options
setopt extendedglob notify
2021-09-29 02:56:36 +02:00
unsetopt beep nomatch
2021-07-31 12:03:59 +02:00
bindkey -v
2022-04-13 23:45:08 +02:00
source ${CUSTOM}/completions/*.zsh
source ~/.aliases
source ~/.config/zsh/kc.zsh
2019-06-08 01:46:49 +02:00
# Bind home and end
bindkey "\033[H" beginning-of-line
bindkey "\033[F" end-of-line
# zle -N zle-line-init
TRAPWINCH() {
zle && { zle reset-prompt; zle -R }
}
# Load fzf
2020-06-15 21:31:14 +02:00
[[ $- == *i* ]] && source "/usr/share/fzf/completion.zsh" NO
source "/usr/share/fzf/key-bindings.zsh" NO
2020-12-10 12:21:24 +01:00
2021-06-28 23:51:30 +02:00
# Pyenv settings
2021-12-27 16:57:31 +01:00
if which pyenv &> /dev/null; then
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
fi
2021-03-08 10:48:40 +01:00
2024-02-05 10:54:18 +01:00
# sway on tty1
if [ -z "${WAYLAND_DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ] && [[ $(tty) = /dev/tty1 ]]; then
date=$(date +%Y-%m-%d-%H:%M:%S)
2024-03-18 15:51:24 +01:00
exec sway
2024-02-04 15:38:06 +01:00
fi
2024-02-05 10:54:18 +01:00
# startx on tty2
[[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty2 ]] && exec startx -- vt1