source /usr/share/zaw/zaw.zsh # fzf xsource /usr/share/fzf/key-bindings.zsh xsource /usr/share/fzf/completion.zsh # fzf history search with support for Ctrl+E history edit like with zaw widget before if typeset -f fzf-history-widget > /dev/null; then # Copied form key-bindings.zsh # CTRL-R - Paste the selected command from history into the command line fzf-history-widget() { local selected num setopt localoptions noglobsubst noposixbuiltins pipefail no_aliases 2> /dev/null selected=( $(fc -rl 1 | perl -ne 'print if !$seen{(/^\s*[0-9]+\**\s+(.*)/, $1)}++' | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} $FZF_DEFAULT_OPTS -n2..,.. --tiebreak=index --bind=ctrl-r:toggle-sort --expect=ctrl-e $FZF_CTRL_R_OPTS --query=${(qqq)LBUFFER} +m" $(__fzfcmd)) ) local ret=$? if [ -n "$selected" ]; then local accept=0 if [[ $selected[1] == ctrl-e ]]; then accept=1 shift selected fi num=$selected[1] if [ -n "$num" ]; then zle vi-fetch-history -n $num [[ $accept = 0 ]] && zle accept-line fi fi zle reset-prompt return $ret } zle -N fzf-history-widget bindkey '^R' fzf-history-widget fi zstyle ':filter-select:highlight' matched fg=green zstyle ':filter-select' max-lines 3 zstyle ':filter-select' extended-search yes eval $(thefuck --alias) export SSH_AUTH_SOCK=/run/user/1000/gnupg/S.gpg-agent.ssh alias diff='diff --color=auto' alias grep='grep --color=auto' alias ip='ip --color=auto' alias pgrep='pgrep --ignore-case --list-full' export LESS_TERMCAP_mb=$'\E[1;31m' # begin blink export LESS_TERMCAP_md=$'\E[1;36m' # begin bold export LESS_TERMCAP_me=$'\E[0m' # reset bold/blink export LESS_TERMCAP_so=$'\E[01;44;33m' # begin reverse video export LESS_TERMCAP_se=$'\E[0m' # reset reverse video export LESS_TERMCAP_us=$'\E[1;32m' # begin underline export LESS_TERMCAP_ue=$'\E[0m' # reset underline export LESSOPEN="| /usr/bin/src-hilite-lesspipe.sh %s" export LESS=' -R ' export PATH=$PATH:~/.local/bin source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh MODE_CURSOR_VIINS="#00ff00 blinking bar" MODE_CURSOR_REPLACE="$MODE_CURSOR_VIINS #ff0000" MODE_CURSOR_VICMD="green block" MODE_CURSOR_SEARCH="#ff00ff steady underline" MODE_CURSOR_VISUAL="$MODE_CURSOR_VICMD steady bar" MODE_CURSOR_VLINE="$MODE_CURSOR_VISUAL #00ffff" source "$HOME/build/zsh-vim-mode/zsh-vim-mode.plugin.zsh" export PF_INFO="ascii os host kernel uptime pkgs memory shell editor wm de palette" pfetch