2021-08-17 19:17:38 +03:00
|
|
|
# key timeout
|
2019-10-26 20:05:31 +03:00
|
|
|
export KEYTIMEOUT=1
|
|
|
|
|
2019-11-11 08:31:15 +02:00
|
|
|
# prompt customization
|
|
|
|
export PURE_PROMPT_SYMBOL="λ"
|
|
|
|
export PURE_PROMPT_VICMD_SYMBOL="y"
|
|
|
|
|
2021-08-17 19:17:38 +03:00
|
|
|
# history settings
|
2019-10-26 20:05:31 +03:00
|
|
|
export HISTFILE=~/.zsh_history
|
2021-08-17 19:17:38 +03: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 20:05:31 +03:00
|
|
|
|
2021-09-06 13:01:34 +03:00
|
|
|
# Enable completions for aliases
|
2021-11-13 12:40:11 +02:00
|
|
|
setopt no_complete_aliases
|
2021-09-06 13:01:34 +03:00
|
|
|
|
2020-01-13 09:26:51 +02:00
|
|
|
# Variable to pass to sdotdrop to get current user
|
|
|
|
export USRNAME=$USER
|
|
|
|
|
2022-09-20 23:56:18 +03:00
|
|
|
# Add ~/.local/bin to path
|
2022-09-21 00:04:09 +03:00
|
|
|
export PATH="$HOME/.local/bin:$PATH"
|
2021-08-17 19:36:11 +03:00
|
|
|
|
2022-09-20 19:20:11 +03:00
|
|
|
# Add ~/.cargo/bin to path
|
2022-09-21 00:04:09 +03:00
|
|
|
export PATH="$HOME/.cargo/bin:$PATH"
|
2022-09-20 19:20:11 +03:00
|
|
|
|
2019-10-26 20:05:31 +03:00
|
|
|
# go path
|
2021-08-17 19:36:11 +03:00
|
|
|
export GOPATH=~/.go
|
2019-10-26 20:05:31 +03:00
|
|
|
|
2021-11-13 13:07:50 +02:00
|
|
|
# fzf settings
|
2022-09-21 10:05:39 +03:00
|
|
|
export FD_COMMAND='fd -HLt'
|
2022-09-22 18:07:59 +03:00
|
|
|
export FZF_DEFAULT_COMMAND="$FD_COMMAND f"
|
2022-08-31 10:09:34 +03:00
|
|
|
export FZF_ALT_C_COMMAND="$FD_COMMAND d"
|
2021-11-13 13:07:50 +02:00
|
|
|
export FZF_DEFAULT_OPTS='-m --ansi --bind ctrl-a:toggle-all,ctrl-d:deselect-all,ctrl-t:toggle-all'
|
|
|
|
export FZF_COMPLETION_TRIGGER='**'
|
2022-09-22 18:07:59 +03:00
|
|
|
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND --strip-cwd-prefix"
|
2021-11-13 13:07:50 +02:00
|
|
|
export FZF_CTRL_T_OPTS='--preview "bat --color=always --style=numbers --line-range=:500 {}"'
|
|
|
|
_fzf_compgen_path() {
|
2022-08-31 10:09:34 +03:00
|
|
|
resultcmd="$FZF_DEFAULT_COMMAND . $1"
|
|
|
|
eval ${resultcmd}
|
|
|
|
}
|
|
|
|
_fzf_compgen_dir() {
|
|
|
|
resultcmd="$FZF_ALT_C_COMMAND . $1"
|
|
|
|
eval ${resultcmd}
|
2021-11-13 13:07:50 +02:00
|
|
|
}
|
2019-10-26 20:05:31 +03:00
|
|
|
|
2020-11-21 15:37:58 +02:00
|
|
|
# dotfile repository location
|
|
|
|
export DOTREPO="$HOME/git/dotfiles"
|
2019-10-26 20:05:31 +03:00
|
|
|
|
|
|
|
# nvim ftw!
|
|
|
|
export EDITOR=nvim
|
2021-12-04 11:43:26 +02:00
|
|
|
export PAGER="$EDITOR -R +\"lua require 'pager'\""
|
2022-08-05 09:38:06 +03:00
|
|
|
export GIT_PAGER="$EDITOR -c 'set ft=git' -R +\"lua require 'pager'\""
|
2021-08-17 21:26:05 +03:00
|
|
|
export PARU_PAGER="$PAGER -c 'set ft=PKGBUILD'"
|
2022-06-22 09:07:26 +03:00
|
|
|
export AUR_PAGER=$EDITOR
|
2021-12-04 11:43:26 +02:00
|
|
|
export MANPAGER="$EDITOR +\"lua require 'pager'\" +Man!"
|
2022-04-10 13:15:40 +03:00
|
|
|
export SYSTEMD_EDITOR=$EDITOR
|
2022-04-14 10:57:51 +03:00
|
|
|
export SYSTEMD_PAGER=less
|
2019-10-26 20:05:31 +03:00
|
|
|
|
2022-09-20 18:04:16 +03:00
|
|
|
{%@@ if distro_id == "arch" or distro_id == "ubuntu" @@%}
|
2022-08-29 20:45:07 +03:00
|
|
|
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
|
|
|
|
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
|
|
|
|
fi
|
2022-09-06 20:10:49 +03:00
|
|
|
gpgconf --launch gpg-agent
|
2022-09-20 18:04:16 +03:00
|
|
|
{%@@ elif distro_id == "termux" @@%}
|
2022-08-29 20:45:07 +03:00
|
|
|
eval $(okc-ssh-agent)
|
2022-08-28 23:58:31 +03:00
|
|
|
{%@@ endif @@%}
|
2021-11-13 12:40:11 +02:00
|
|
|
|
|
|
|
# Enable grc colorization of supported commands
|
|
|
|
[[ -s "/etc/grc.zsh" ]] && source /etc/grc.zsh
|
2021-11-30 17:38:54 +02:00
|
|
|
|
|
|
|
# Disable dotdrop submodule auto update
|
2022-04-10 13:15:40 +03:00
|
|
|
export DOTDROP_AUTOUPDATE=no
|