Browse Source

first commit

master
czar 1 year ago
commit
de14c8f87f
  1. 9
      etc/profile.d/xdg-vars.sh
  2. 1
      etc/zsh/zshenv
  3. 5
      home/czar/.config/zsh/.opts
  4. 65
      home/czar/.config/zsh/.zshrc

9
etc/profile.d/xdg-vars.sh

@ -0,0 +1,9 @@
export XDG_CONFIG_HOME=$HOME/.config
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_RUNTIME_DIR="$(mktemp -d)"
export GNUPGHOME="$XDG_DATA_HOME"/gnupg
export PASSWORD_STORE_DIR="$XDG_DATA_HOME"/pass
export WGETRC="$XDG_CONFIG_HOME"/wgetrc
export WEECHAT_HOME="$XDG_CONFIG_HOME"/weechat

1
etc/zsh/zshenv

@ -0,0 +1 @@
ZDOTDIR=$HOME/.config/zsh

5
home/czar/.config/zsh/.opts

@ -0,0 +1,5 @@
export EDITOR=emacs
export VISUAL=emacs
alias emacs="emacs -nw "
alias sudo="sudo "

65
home/czar/.config/zsh/.zshrc

@ -0,0 +1,65 @@
zstyle ':completion:*' completer _expand _complete _ignored
zstyle ':completion:*' group-name ''
zstyle ':completion:*' list-colors ''
zstyle ':completion:*' menu select=2
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
zstyle ':completion:*' verbose true
autoload -Uz compinit
compinit -d $XDG_CACHE_HOME/zsh/zcompdump-$ZSH_VERSION
export HISTFILE="$XDG_DATA_HOME"/zsh/history
HISTSIZE=5000
SAVEHIST=5000
setopt INC_APPEND_HISTORY
bindkey -e
autoload -U up-line-or-beginning-search
autoload -U down-line-or-beginning-search
zle -N up-line-or-beginning-search
zle -N down-line-or-beginning-search
typeset -g -A key
key[Home]="${terminfo[khome]}"
key[End]="${terminfo[kend]}"
key[Insert]="${terminfo[kich1]}"
key[Backspace]="${terminfo[kbs]}"
key[Delete]="${terminfo[kdch1]}"
key[Up]="${terminfo[kcuu1]}"
key[Down]="${terminfo[kcud1]}"
key[Left]="${terminfo[kcub1]}"
key[Right]="${terminfo[kcuf1]}"
key[PageUp]="${terminfo[kpp]}"
key[PageDown]="${terminfo[knp]}"
key[Shift-Tab]="${terminfo[kcbt]}"
[[ -n "${key[Home]}" ]] && bindkey -- "${key[Home]}" beginning-of-line
[[ -n "${key[End]}" ]] && bindkey -- "${key[End]}" end-of-line
[[ -n "${key[Insert]}" ]] && bindkey -- "${key[Insert]}" overwrite-mode
[[ -n "${key[Backspace]}" ]] && bindkey -- "${key[Backspace]}" backward-delete-char
[[ -n "${key[Delete]}" ]] && bindkey -- "${key[Delete]}" delete-char
[[ -n "${key[Up]}" ]] && bindkey -- "${key[Up]}" up-line-or-beginning-search
[[ -n "${key[Down]}" ]] && bindkey -- "${key[Down]}" down-line-or-beginning-search
[[ -n "${key[Left]}" ]] && bindkey -- "${key[Left]}" backward-char
[[ -n "${key[Right]}" ]] && bindkey -- "${key[Right]}" forward-char
[[ -n "${key[PageUp]}" ]] && bindkey -- "${key[PageUp]}" beginning-of-buffer-or-history
[[ -n "${key[PageDown]}" ]] && bindkey -- "${key[PageDown]}" end-of-buffer-or-history
[[ -n "${key[Shift-Tab]}" ]] && bindkey -- "${key[Shift-Tab]}" reverse-menu-complete
if (( ${+terminfo[smkx]} && ${+terminfo[rmkx]} )); then
autoload -Uz add-zle-hook-widget
function zle_application_mode_start { echoti smkx }
function zle_application_mode_stop { echoti rmkx }
add-zle-hook-widget -Uz zle-line-init zle_application_mode_start
add-zle-hook-widget -Uz zle-line-finish zle_application_mode_stop
fi
bindkey "^[[1;5C" forward-word
bindkey "^[[1;5D" backward-word
PROMPT='[%F{10}%n%f@%F{blue}%m%f %F{blue}%B%~%b%f] λ %f'
source $ZDOTDIR/.opts
Loading…
Cancel
Save