mirror of
https://github.com/frebib/dotfiles.git
synced 2024-06-14 12:57:23 +00:00
Compare commits
4 Commits
c719fad76a
...
a2ad4853ed
Author | SHA1 | Date | |
---|---|---|---|
a2ad4853ed | |||
ecb282cabb | |||
6d33d4685c | |||
5ace0bb7f4 |
@ -1,7 +1,6 @@
|
|||||||
# 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"
|
||||||
|
82
fsh/fish.ini
Normal file
82
fsh/fish.ini
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
[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
|
84
zsh/.zshrc
84
zsh/.zshrc
@ -1,5 +1,5 @@
|
|||||||
# Config and cache directory paths
|
# Config and cache directory paths
|
||||||
ZSH_DIR="$XDG_CONFIG_HOME/zsh"
|
ZSH_DIR="${ZDOTDIR:-$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
|
||||||
|
|
||||||
# Load antigen & plugins
|
declare -A ZINIT
|
||||||
ANTIGEN_LOG="$LOG_DIR/antigen-$(date -u --iso-8601=seconds | cut -d+ -f1).log"
|
ZINIT[HOME_DIR]="$XDG_CACHE_HOME/zsh/zinit"
|
||||||
antigen_src="$ADOTDIR/antigen.zsh"
|
ZINIT[BIN_DIR]="${ZINIT[HOME_DIR]}/bin"
|
||||||
if [ ! -f "$antigen_src" ]; then
|
ZINIT[PLUGINS_DIR]="${ZINIT[HOME_DIR]}/plugins"
|
||||||
git clone https://github.com/zsh-users/antigen.git "$ADOTDIR"
|
if [ ! -e "${ZINIT[HOME_DIR]}" ]; then
|
||||||
|
git clone https://github.com/zdharma/zinit.git "${ZINIT[HOME_DIR]}"
|
||||||
fi
|
fi
|
||||||
source "$antigen_src"
|
source "${ZINIT[HOME_DIR]}"/zinit.zsh
|
||||||
|
|
||||||
antigen bundle zsh-users/zsh-completions
|
zinit wait lucid light-mode for \
|
||||||
antigen bundle zsh-users/zsh-autosuggestions
|
atinit"ZINIT[COMPINIT_OPTS]=-C; zicompinit; zicdreplay" \
|
||||||
antigen bundle zsh-users/zsh-syntax-highlighting
|
zdharma/fast-syntax-highlighting \
|
||||||
antigen bundle mafredri/zsh-async
|
blockf \
|
||||||
antigen bundle agkozak/zsh-z
|
zsh-users/zsh-completions \
|
||||||
|
atload"!_zsh_autosuggest_start" \
|
||||||
|
zsh-users/zsh-autosuggestions
|
||||||
|
|
||||||
antigen apply
|
zinit light Aloxaf/fzf-tab
|
||||||
|
zinit light agkozak/zsh-z
|
||||||
|
|
||||||
# Vim mode!
|
# Vim mode!
|
||||||
bindkey -v
|
bindkey -v
|
||||||
@ -114,56 +114,14 @@ 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
|
|
||||||
|
|
||||||
# Completion initialisation
|
trysource() { for f in "$@"; do source "$f" 2>/dev/null && return; done; }
|
||||||
autoload -U compinit bashcompinit
|
trysource /usr/share/fzf/key-bindings.zsh \
|
||||||
compinit
|
/usr/share/doc/fzf/examples/key-bindings.zsh
|
||||||
bashcompinit
|
trysource /usr/share/doc/pkgfile/command-not-found.zsh # pkgfile on Arch
|
||||||
|
|
||||||
# gopass completion
|
|
||||||
if exists gopass; then
|
|
||||||
source <(gopass completion bash)
|
|
||||||
fi
|
|
||||||
|
Loading…
Reference in New Issue
Block a user