2021-08-17 16:17:38 +00:00
|
|
|
# key timeout
|
2019-10-26 17:05:31 +00:00
|
|
|
export KEYTIMEOUT=1
|
|
|
|
|
2019-11-11 06:31:15 +00:00
|
|
|
# prompt customization
|
|
|
|
export PURE_PROMPT_SYMBOL="λ"
|
|
|
|
export PURE_PROMPT_VICMD_SYMBOL="y"
|
|
|
|
|
2021-08-17 16:17:38 +00:00
|
|
|
# history settings
|
2019-10-26 17:05:31 +00:00
|
|
|
export HISTFILE=~/.zsh_history
|
2021-08-17 16:17:38 +00:00
|
|
|
export HISTSIZE=10000
|
|
|
|
export SAVEHIST=10000
|
|
|
|
# Ignore these functions from history since they will
|
|
|
|
# append the expandend command to the history
|
|
|
|
export HISTORY_IGNORE="(pi|pr)"
|
|
|
|
# Additional settings (source https://jdhao.github.io/2021/03/24/zsh_history_setup)
|
|
|
|
setopt HIST_IGNORE_ALL_DUPS
|
|
|
|
setopt HIST_SAVE_NO_DUPS
|
|
|
|
setopt HIST_REDUCE_BLANKS
|
|
|
|
setopt INC_APPEND_HISTORY_TIME
|
|
|
|
setopt EXTENDED_HISTORY
|
2019-10-26 17:05:31 +00:00
|
|
|
|
2021-09-06 10:01:34 +00:00
|
|
|
# Enable completions for aliases
|
2021-11-13 10:40:11 +00:00
|
|
|
setopt no_complete_aliases
|
2021-09-06 10:01:34 +00:00
|
|
|
|
2020-01-13 07:26:51 +00:00
|
|
|
# Variable to pass to sdotdrop to get current user
|
|
|
|
export USRNAME=$USER
|
|
|
|
|
2021-08-17 16:36:11 +00:00
|
|
|
# Add ~/.bin to path
|
|
|
|
export PATH="/home/$USER/.bin:$PATH"
|
|
|
|
|
2019-10-26 17:05:31 +00:00
|
|
|
# go path
|
2021-08-17 16:36:11 +00:00
|
|
|
export GOPATH=~/.go
|
2019-10-26 17:05:31 +00:00
|
|
|
|
2021-11-13 11:07:50 +00:00
|
|
|
# fzf settings
|
|
|
|
export FZF_DEFAULT_COMMAND='fd -Ht f'
|
|
|
|
export FZF_ALT_C_COMMAND='fd -Ht d'
|
|
|
|
export FZF_DEFAULT_OPTS='-m --ansi --bind ctrl-a:toggle-all,ctrl-d:deselect-all,ctrl-t:toggle-all'
|
|
|
|
export FZF_COMPLETION_TRIGGER='**'
|
|
|
|
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
|
|
|
|
export FZF_CTRL_T_OPTS='--preview "bat --color=always --style=numbers --line-range=:500 {}"'
|
|
|
|
_fzf_compgen_dir() {
|
2022-03-11 16:14:21 +00:00
|
|
|
fd -Ht d
|
2021-11-13 11:07:50 +00:00
|
|
|
}
|
|
|
|
_fzf_compgen_path() {
|
2022-03-11 16:14:21 +00:00
|
|
|
fd -Ht f
|
2021-11-13 11:07:50 +00:00
|
|
|
}
|
2019-10-26 17:05:31 +00:00
|
|
|
|
2020-11-21 13:37:58 +00:00
|
|
|
# dotfile repository location
|
|
|
|
export DOTREPO="$HOME/git/dotfiles"
|
2019-10-26 17:05:31 +00:00
|
|
|
|
|
|
|
# nvim ftw!
|
|
|
|
export EDITOR=nvim
|
2021-12-04 09:43:26 +00:00
|
|
|
export PAGER="$EDITOR -R +\"lua require 'pager'\""
|
2022-03-02 15:31:05 +00:00
|
|
|
export GIT_PAGER="$EDITOR -R +\"lua require 'pager'\""
|
2021-08-17 18:26:05 +00:00
|
|
|
export PARU_PAGER="$PAGER -c 'set ft=PKGBUILD'"
|
2020-12-20 13:34:07 +00:00
|
|
|
export AUR_PAGER=$PAGER
|
2021-12-04 09:43:26 +00:00
|
|
|
export MANPAGER="$EDITOR +\"lua require 'pager'\" +Man!"
|
2019-10-26 17:05:31 +00:00
|
|
|
|
2020-12-16 22:08:23 +00:00
|
|
|
# Use GPG for SSH authentication
|
2019-10-26 17:05:31 +00:00
|
|
|
export GPG_TTY="$(tty)"
|
2020-12-16 22:08:23 +00:00
|
|
|
|
|
|
|
# set SSH_AUTH_SOCK if not logging in over SSH
|
2021-10-06 18:26:24 +00:00
|
|
|
if [ "$SSH_CONNECTION" = "" ]; then
|
2022-03-11 16:14:21 +00:00
|
|
|
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
|
|
|
#gpgconf --launch gpg-agent
|
|
|
|
gpg-connect-agent updatestartuptty /bye >/dev/null
|
2020-12-16 22:08:23 +00:00
|
|
|
fi
|
2021-11-13 10:40:11 +00:00
|
|
|
|
|
|
|
# Enable grc colorization of supported commands
|
|
|
|
[[ -s "/etc/grc.zsh" ]] && source /etc/grc.zsh
|
2021-11-30 15:38:54 +00:00
|
|
|
|
|
|
|
# Disable dotdrop submodule auto update
|
|
|
|
DOTDROP_AUTOUPDATE=no
|