Refactor modules into nixos and home-manager
All checks were successful
Check flake / build-amd64-linux (push) Successful in 3m14s
All checks were successful
Check flake / build-amd64-linux (push) Successful in 3m14s
This commit is contained in:
99
modules/home-manager/shell/zsh/config.zsh
Normal file
99
modules/home-manager/shell/zsh/config.zsh
Normal file
@ -0,0 +1,99 @@
|
||||
####
|
||||
## zsh configuration
|
||||
####
|
||||
|
||||
## Colors
|
||||
autoload -U colors && colors
|
||||
|
||||
## Completion
|
||||
setopt HASH_LIST_ALL
|
||||
unsetopt AUTO_NAME_DIRS
|
||||
autoload -Uz compinit
|
||||
zstyle ':completion:*' menu select
|
||||
zmodload zsh/complist
|
||||
compinit
|
||||
_comp_options+=(globdots) # Include hidden files
|
||||
|
||||
## Directories
|
||||
setopt AUTO_PUSHD
|
||||
setopt CDABLE_VARS
|
||||
setopt PUSHD_IGNORE_DUPS
|
||||
setopt PUSHD_SILENT
|
||||
setopt PUSHD_TO_HOME
|
||||
unsetopt AUTO_CD
|
||||
|
||||
## Expansion and globbing
|
||||
setopt EXTENDED_GLOB
|
||||
unsetopt GLOB_DOTS
|
||||
unsetopt NOMATCH
|
||||
|
||||
## History
|
||||
HISTFILE="${XDG_DATA_HOME:-${HOME}/.local/share}/zsh/history"
|
||||
HISTSIZE=1000000
|
||||
SAVEHIST=1000000
|
||||
[[ !( -f "${HISTFILE}" ) ]] && mkdir -p $(dirname ${HISTFILE})
|
||||
|
||||
setopt APPEND_HISTORY
|
||||
setopt BANG_HIST
|
||||
setopt EXTENDED_HISTORY
|
||||
setopt HIST_IGNORE_ALL_DUPS
|
||||
setopt HIST_IGNORE_DUPS
|
||||
setopt HIST_IGNORE_SPACE
|
||||
setopt HIST_SAVE_NO_DUPS
|
||||
setopt HIST_VERIFY
|
||||
setopt INC_APPEND_HISTORY_TIME
|
||||
setopt SHARE_HISTORY
|
||||
|
||||
## I/O
|
||||
setopt INTERACTIVE_COMMENTS
|
||||
setopt MULTIOS
|
||||
unsetopt CLOBBER
|
||||
|
||||
## Jobs
|
||||
setopt LONG_LIST_JOBS
|
||||
setopt AUTO_RESUME
|
||||
unsetopt BG_NICE
|
||||
unsetopt NOTIFY
|
||||
unsetopt HUP
|
||||
unsetopt CHECK_JOBS
|
||||
|
||||
## Shell emulation
|
||||
setopt APPEND_CREATE
|
||||
|
||||
## Prompt
|
||||
PS1="%B%{$fg[magenta]%}%~%{$reset_color%} $%b "
|
||||
|
||||
## Window title
|
||||
precmd () { print -Pn "\e]0;%n@%m: %~\a" }
|
||||
preexec () { print -Pn "\e]0;%n@%m: $1\a" }
|
||||
|
||||
## Vi mode
|
||||
bindkey -v
|
||||
export KEYTIMEOUT=1
|
||||
|
||||
## Zsh line editor
|
||||
unsetopt BEEP
|
||||
|
||||
|
||||
####
|
||||
## Plugins
|
||||
####
|
||||
|
||||
export ZGEN_AUTOLOAD_COMPINIT=0
|
||||
|
||||
# zsh-vim-mode
|
||||
export MODE_INDICATOR=""
|
||||
export MODE_CURSOR_VIINS="#b77ee0 blinking bar"
|
||||
export MODE_CURSOR_REPLACE="$MODE_CURSOR_VIINS #ff3334"
|
||||
export MODE_CURSOR_VICMD="#b77ee0 block"
|
||||
export MODE_CURSOR_SEARCH="#e7c547 steady underline"
|
||||
export MODE_CURSOR_VISUAL="$MODE_CURSOR_VICMD steady bar"
|
||||
export MODE_CURSOR_VLINE="$MODE_CURSOR_VISUAL #54ced6"
|
||||
|
||||
# fzf
|
||||
if (( $+commands[fd] )); then
|
||||
export FZF_DEFAULT_OPTS="--reverse --ansi"
|
||||
export FZF_DEFAULT_COMMAND="fd ."
|
||||
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
|
||||
export FZF_ALT_C_COMMAND="fd -t d . $HOME"
|
||||
fi
|
Reference in New Issue
Block a user