1
0
mirror of https://github.com/frebib/dotfiles.git synced 2024-06-14 12:57:23 +00:00

Compare commits

..

No commits in common. "a2ad4853eda31a6777a8d2e0cc7fb99a5194a7af" and "c719fad76a7ee3f84339b93ee9b3dc629e4166b9" have entirely different histories.

3 changed files with 64 additions and 103 deletions

View File

@ -1,6 +1,7 @@
# Override paths for non-compliant programs # Override paths for non-compliant programs
# https://wiki.archlinux.org/index.php/XDG_Base_Directory_support # https://wiki.archlinux.org/index.php/XDG_Base_Directory_support
ADOTDIR="$XDG_DATA_HOME/zsh/antigen"
ASPELL_CONF="per-conf $XDG_CONFIG_HOME/aspell/aspell.conf; personal $XDG_CONFIG_HOME/aspell/en.pws; repl $XDG_CONFIG_HOME/aspell/en.prepl" ASPELL_CONF="per-conf $XDG_CONFIG_HOME/aspell/aspell.conf; personal $XDG_CONFIG_HOME/aspell/en.pws; repl $XDG_CONFIG_HOME/aspell/en.prepl"
CARGO_HOME="$XDG_DATA_HOME/cargo" CARGO_HOME="$XDG_DATA_HOME/cargo"
GNUPGHOME="$XDG_CONFIG_HOME/gnupg" GNUPGHOME="$XDG_CONFIG_HOME/gnupg"

View File

@ -1,82 +0,0 @@
[base]
default = 12
unknown-token = red,bold
commandseparator = cyan
redirection = cyan,bold
here-string-tri = yellow
here-string-text = 18
here-string-var = cyan,bg:18
exec-descriptor = yellow,bold
comment = 7
correct-subtle = 12
incorrect-subtle = red
subtle-separator = green
subtle-bg = bg:18
secondary =
recursive-base =
[command-point]
reserved-word = yellow
subcommand = yellow
alias = blue
suffix-alias = green
global-alias = blue,bold
builtin = blue
function = blue
command = blue
precommand = blue
hashed-command = green
single-sq-bracket = green
double-sq-bracket = green
double-paren = yellow
[paths]
path = cyan
pathseparator = cyan
path-to-dir = magenta,underline
globbing = red
globbing-ext = 13
[brackets]
paired-bracket = bg:blue
bracket-level-1 = green,bold
bracket-level-2 = yellow,bold
bracket-level-3 = cyan,bold
[arguments]
single-hyphen-option = 12
double-hyphen-option = 12
back-quoted-argument = none
single-quoted-argument = yellow
double-quoted-argument = yellow
dollar-quoted-argument = yellow
[in-string]
; backslash in $'...'
back-dollar-quoted-argument = cyan
; backslash or $... in "..."
back-or-dollar-double-quoted-argument = cyan
[other]
variable = 113
assign = green
assign-array-bracket = green
history-expansion = blue,bold
[math]
mathvar = blue,bold
mathnum = magenta
matherr = red
[for-loop]
forvar = none
fornum = magenta
; operator
foroper = yellow
; separator
forsep = yellow,bold
[case]
case-input = green
case-parentheses = yellow
case-condition = bg:blue

View File

@ -1,5 +1,5 @@
# Config and cache directory paths # Config and cache directory paths
ZSH_DIR="${ZDOTDIR:-$XDG_CONFIG_HOME/zsh}" ZSH_DIR="$XDG_CONFIG_HOME/zsh"
LOG_DIR="$XDG_DATA_HOME/logs" LOG_DIR="$XDG_DATA_HOME/logs"
HISTFILE="$XDG_DATA_HOME/zsh/history" HISTFILE="$XDG_DATA_HOME/zsh/history"
HISTSIZE=999999 HISTSIZE=999999
@ -52,29 +52,29 @@ zstyle ':completion:*' menu select
zstyle ':completion:*' list-colors "${(@s.:.)LS_COLORS}" zstyle ':completion:*' list-colors "${(@s.:.)LS_COLORS}"
zstyle ':compinstall' filename "${ZDOTDIR:-~}/.zshrc" zstyle ':compinstall' filename "${ZDOTDIR:-~}/.zshrc"
# Pre-load vi-mode edit-command-line before antigen plugins are loaded
autoload -z edit-command-line
zle -N edit-command-line
export WORDCHARS='*?_[]~=&;!#$%^(){}' export WORDCHARS='*?_[]~=&;!#$%^(){}'
x-bash-backward-kill-word(){ WORDCHARS='' zle kill-word; } x-bash-backward-kill-word(){ WORDCHARS='' zle kill-word; }
zle -N x-bash-backward-kill-word zle -N x-bash-backward-kill-word
declare -A ZINIT # Load antigen & plugins
ZINIT[HOME_DIR]="$XDG_CACHE_HOME/zsh/zinit" ANTIGEN_LOG="$LOG_DIR/antigen-$(date -u --iso-8601=seconds | cut -d+ -f1).log"
ZINIT[BIN_DIR]="${ZINIT[HOME_DIR]}/bin" antigen_src="$ADOTDIR/antigen.zsh"
ZINIT[PLUGINS_DIR]="${ZINIT[HOME_DIR]}/plugins" if [ ! -f "$antigen_src" ]; then
if [ ! -e "${ZINIT[HOME_DIR]}" ]; then git clone https://github.com/zsh-users/antigen.git "$ADOTDIR"
git clone https://github.com/zdharma/zinit.git "${ZINIT[HOME_DIR]}"
fi fi
source "${ZINIT[HOME_DIR]}"/zinit.zsh source "$antigen_src"
zinit wait lucid light-mode for \ antigen bundle zsh-users/zsh-completions
atinit"ZINIT[COMPINIT_OPTS]=-C; zicompinit; zicdreplay" \ antigen bundle zsh-users/zsh-autosuggestions
zdharma/fast-syntax-highlighting \ antigen bundle zsh-users/zsh-syntax-highlighting
blockf \ antigen bundle mafredri/zsh-async
zsh-users/zsh-completions \ antigen bundle agkozak/zsh-z
atload"!_zsh_autosuggest_start" \
zsh-users/zsh-autosuggestions
zinit light Aloxaf/fzf-tab antigen apply
zinit light agkozak/zsh-z
# Vim mode! # Vim mode!
bindkey -v bindkey -v
@ -114,14 +114,56 @@ ZSH_AUTOSUGGEST_USE_ASYNC=true
ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=128 ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=128
ZSH_AUTOSUGGEST_CLEAR_WIDGETS=("${(@)ZSH_AUTOSUGGEST_CLEAR_WIDGETS:#(up|down)-line-or-history}") ZSH_AUTOSUGGEST_CLEAR_WIDGETS=("${(@)ZSH_AUTOSUGGEST_CLEAR_WIDGETS:#(up|down)-line-or-history}")
default='fg=12'
prog='fg=blue'
ZSH_HIGHLIGHT_STYLES=()
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets root line)
ZSH_HIGHLIGHT_STYLES[root]='bg=red'
ZSH_HIGHLIGHT_STYLES[default]=$default
ZSH_HIGHLIGHT_STYLES[arg0]=$prog
ZSH_HIGHLIGHT_STYLES[unknown-token]='fg=red,bold'
ZSH_HIGHLIGHT_STYLES[reserved-word]='fg=yellow'
ZSH_HIGHLIGHT_STYLES[alias]=$prog
ZSH_HIGHLIGHT_STYLES[suffix-alias]='fg=green'
ZSH_HIGHLIGHT_STYLES[builtin]='fg=4'
ZSH_HIGHLIGHT_STYLES[function]=$prog
ZSH_HIGHLIGHT_STYLES[command]=$prog
ZSH_HIGHLIGHT_STYLES[precommand]='fg=4'
ZSH_HIGHLIGHT_STYLES[commandseparator]='fg=cyan'
ZSH_HIGHLIGHT_STYLES[hashed-command]='fg=green'
ZSH_HIGHLIGHT_STYLES[path]='fg=cyan'
ZSH_HIGHLIGHT_STYLES[path_separator]='fg=cyan'
ZSH_HIGHLIGHT_STYLES[path_prefix]='fg=208'
ZSH_HIGHLIGHT_STYLES[globbing]='fg=red'
ZSH_HIGHLIGHT_STYLES[comment]='fg=7'
ZSH_HIGHLIGHT_STYLES[history-expansion]=$default
ZSH_HIGHLIGHT_STYLES[single-hyphen-option]=$default
ZSH_HIGHLIGHT_STYLES[double-hyphen-option]=$default
ZSH_HIGHLIGHT_STYLES[back-quoted-argument]='fg=magenta'
ZSH_HIGHLIGHT_STYLES[single-quoted-argument]='fg=yellow'
ZSH_HIGHLIGHT_STYLES[double-quoted-argument]='fg=yellow'
ZSH_HIGHLIGHT_STYLES[dollar-quoted-argument]='fg=yellow'
ZSH_HIGHLIGHT_STYLES[dollar-double-quoted-argument]='fg=cyan'
ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]='fg=cyan'
ZSH_HIGHLIGHT_STYLES[back-dollar-quoted-argument]='fg=cyan'
ZSH_HIGHLIGHT_STYLES[assign]='fg=green'
ZSH_HIGHLIGHT_STYLES[redirection]='fg=cyan,bold'
source "$XDG_CONFIG_HOME/aliases" source "$XDG_CONFIG_HOME/aliases"
# Load some manual plugins # Load some manual plugins
source "$ZSH_DIR/plugins/sudo.zsh" source "$ZSH_DIR/plugins/sudo.zsh"
source "$ZSH_DIR/plugins/fish-theme.zsh" source "$ZSH_DIR/plugins/fish-theme.zsh"
source "$ZSH_DIR/plugins/git-rprompt.zsh" source "$ZSH_DIR/plugins/git-rprompt.zsh"
[ -f '/usr/share/fzf/key-bindings.zsh' ] && source /usr/share/fzf/key-bindings.zsh
[ -f '/usr/share/doc/pkgfile/command-not-found.zsh' ] && source /usr/share/doc/pkgfile/command-not-found.zsh
trysource() { for f in "$@"; do source "$f" 2>/dev/null && return; done; } # Completion initialisation
trysource /usr/share/fzf/key-bindings.zsh \ autoload -U compinit bashcompinit
/usr/share/doc/fzf/examples/key-bindings.zsh compinit
trysource /usr/share/doc/pkgfile/command-not-found.zsh # pkgfile on Arch bashcompinit
# gopass completion
if exists gopass; then
source <(gopass completion bash)
fi