diff options
author | xero <x@xero.nu> | 2015-03-07 20:49:16 -0500 |
---|---|---|
committer | xero <x@xero.nu> | 2015-03-07 20:49:28 -0500 |
commit | 37ef7b9e48d9a496c08540772a110b85aacac2e6 (patch) | |
tree | 90ca18509aa45ec523a550c3a6ad622ca2d627a4 /zsh | |
parent | 627c9813c7c95ea2e3d45de0e44bab4f17e78f51 (diff) | |
download | dotfiles_ascii-37ef7b9e48d9a496c08540772a110b85aacac2e6.tar.xz dotfiles_ascii-37ef7b9e48d9a496c08540772a110b85aacac2e6.zip |
organize and modularize zsh configs
Diffstat (limited to 'zsh')
-rwxr-xr-x | zsh/.zsh/aliases.zsh | 57 | ||||
-rwxr-xr-x | zsh/.zsh/autocompletion.zsh | 35 | ||||
-rwxr-xr-x[-rw-r--r--] | zsh/.zsh/colored-man-pages.zsh | 16 | ||||
-rwxr-xr-x | zsh/.zsh/custom-prompt.zsh | 40 | ||||
-rwxr-xr-x | zsh/.zsh/dual-line-prompt._zsh | 19 | ||||
-rwxr-xr-x[-rw-r--r--] | zsh/.zsh/functions/chpwd_update_git_vars | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | zsh/.zsh/functions/precmd_update_git_vars | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | zsh/.zsh/functions/preexec_update_git_vars | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | zsh/.zsh/functions/prompt_git_info | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | zsh/.zsh/functions/update_current_git_vars | 0 | ||||
-rwxr-xr-x | zsh/.zsh/history.zsh | 24 | ||||
-rwxr-xr-x | zsh/.zsh/keybindings.zsh | 51 | ||||
-rwxr-xr-x | zsh/.zsh/keychain.zsh | 18 | ||||
-rwxr-xr-x | zsh/.zsh/minimal-prompt.zsh | 18 | ||||
-rwxr-xr-x | zsh/.zsh/ninja-prompt._zsh | 22 | ||||
-rwxr-xr-x | zsh/.zsh/nodejs.zsh | 18 | ||||
-rwxr-xr-x | zsh/.zsh/settings.zsh | 29 | ||||
-rwxr-xr-x[-rw-r--r--] | zsh/.zshrc | 173 |
18 files changed, 348 insertions, 172 deletions
diff --git a/zsh/.zsh/aliases.zsh b/zsh/.zsh/aliases.zsh new file mode 100755 index 0000000..5046a76 --- /dev/null +++ b/zsh/.zsh/aliases.zsh @@ -0,0 +1,57 @@ +# ██ +# ░██ +# ██████ ██████░██ +# ░░░░██ ██░░░░ ░██████ +# ██ ░░█████ ░██░░░██ +# ██ ░░░░░██░██ ░██ +# ██████ ██████ ░██ ░██ +# ░░░░░░ ░░░░░░ ░░ ░░ +# +# ▓▓▓▓▓▓▓▓▓▓ +# ░▓ author ▓ xero <x@xero.nu> +# ░▓ code ▓ http://code.xero.nu/dotfiles +# ░▓ mirror ▓ http://git.io/.files +# ░▓▓▓▓▓▓▓▓▓▓ +# ░░░░░░░░░░ +# +#█▓▒░ aliases +alias ls="ls --color=auto" +alias lsla="ls -la --color=auto" +alias lsls="ls -la --color=auto" +alias lsl="ls -l --color=auto" +alias "cd.."="cd ../" +alias up="cd ../" +alias rock="ncmpcpp" +alias mixer="alsamixer" +alias checkrootkits="sudo rkhunter --update; sudo rkhunter --propupd; sudo rkhunter --check" +alias checkvirus="clamscan --recursive=yes --infected /home" +alias updateantivirus="sudo freshclam" +alias genplaylist="cd ~/music;find . -name '*.mp3' -o -name '*.flac'|sed -e 's%^./%%g' > ~/.mpd/playlists/all.m3u" +alias matrix="cmatrix -b" +alias pipes="bash ~/code/fun/pipes" +alias pipesx="bash ~/code/fun/pipesx" +alias rain="bash ~/code/fun/rain" +alias screenfetch="~/code/sys/info" +alias hashcompare="bash ~/code/sys/hash-compare " +alias tempwatch="while :; do sensors; sleep 1 && clear; done;" +alias term="urxvtc -hold -e " #used for awesomewm run menu +alias tmx="bash ~/code/sys/tmx" +alias fixcursor="xsetroot -cursor_name left_ptr" +alias img="bash ~/code/sys/img" +alias gitio="bash ~/code/sys/gitio" +alias ix="bash ~/code/sys/ix" +alias ioup="~/code/sys/ioup" +alias sprunge="curl -F 'sprunge=<-' http://sprunge.us" +alias clbin="curl -F 'clbin=<-' https://clbin.com" +alias toiletlist='for i in ${TOILET_FONT_PATH:=/usr/share/figlet}/*.{t,f}lf; do j=${i##*/}; echo ""; echo "╓───── "$j; echo "╙────────────────────────────────────── ─ ─ "; echo ""; toilet -d "${i%/*}" -f "$j" "${j%.*}"; done' +alias ascii="toilet -f 3d" +alias metal="toilet -f 3d --metal" +alias pacman="sudo pacman" +alias systemctl="sudo systemctl" +alias apachereload='sudo systemctl restart httpd.service' +alias disks='echo "╓───── m o u n t . p o i n t s"; echo "╙────────────────────────────────────── ─ ─ "; lsblk -a; echo ""; echo "╓───── d i s k . u s a g e"; echo "╙────────────────────────────────────── ─ ─ "; df -h;' +alias todo="bash ~/code/sys/todo" +alias record="ffmpeg -f x11grab -s 1366x768 -an -r 16 -loglevel quiet -i :0.0 -b:v 5M -y " #pass a filename +email() { + echo $3 | mutt -s $2 $1 +} diff --git a/zsh/.zsh/autocompletion.zsh b/zsh/.zsh/autocompletion.zsh new file mode 100755 index 0000000..273e604 --- /dev/null +++ b/zsh/.zsh/autocompletion.zsh @@ -0,0 +1,35 @@ +# ██ +# ░██ +# ██████ ██████░██ +# ░░░░██ ██░░░░ ░██████ +# ██ ░░█████ ░██░░░██ +# ██ ░░░░░██░██ ░██ +# ██████ ██████ ░██ ░██ +# ░░░░░░ ░░░░░░ ░░ ░░ +# +# ▓▓▓▓▓▓▓▓▓▓ +# ░▓ author ▓ xero <x@xero.nu> +# ░▓ code ▓ http://code.xero.nu/dotfiles +# ░▓ mirror ▓ http://git.io/.files +# ░▓▓▓▓▓▓▓▓▓▓ +# ░░░░░░░░░░ +# +#█▓▒░ autocompletion systems +autoload -Uz compinit +compinit + +zstyle ':completion:*' auto-description 'specify: %d' +zstyle ':completion:*' completer _expand _complete _correct _approximate +zstyle ':completion:*' format 'Completing %d' +zstyle ':completion:*' group-name '' +zstyle ':completion:*' menu select=2 eval "$(dircolors -b)" +zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} +zstyle ':completion:*' list-colors '' +zstyle ':completion:*' list-prompt %SAt %p: hit TAB for more, or the character to insert%s +zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=* l:|=*' +zstyle ':completion:*' menu select=long +zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s +zstyle ':completion:*' use-compctl false +zstyle ':completion:*' verbose true +zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31' +zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd' diff --git a/zsh/.zsh/colored-man-pages.zsh b/zsh/.zsh/colored-man-pages.zsh index 6854d97..5819c4f 100644..100755 --- a/zsh/.zsh/colored-man-pages.zsh +++ b/zsh/.zsh/colored-man-pages.zsh @@ -1,3 +1,19 @@ +# ██ +# ░██ +# ██████ ██████░██ +# ░░░░██ ██░░░░ ░██████ +# ██ ░░█████ ░██░░░██ +# ██ ░░░░░██░██ ░██ +# ██████ ██████ ░██ ░██ +# ░░░░░░ ░░░░░░ ░░ ░░ +# +# ▓▓▓▓▓▓▓▓▓▓ +# ░▓ author ▓ xero <x@xero.nu> +# ░▓ code ▓ http://code.xero.nu/dotfiles +# ░▓ mirror ▓ http://git.io/.files +# ░▓▓▓▓▓▓▓▓▓▓ +# ░░░░░░░░░░ +# #█▓▒░ source: https://github.com/imkira/dotfiles/blob/master/.zsh/colored-man-pages.zsh export LESS_TERMCAP_mb=$'\E[01;31m' export LESS_TERMCAP_md=$'\E[01;38;5;74m' diff --git a/zsh/.zsh/custom-prompt.zsh b/zsh/.zsh/custom-prompt.zsh new file mode 100755 index 0000000..495aa37 --- /dev/null +++ b/zsh/.zsh/custom-prompt.zsh @@ -0,0 +1,40 @@ +# ██ +# ░██ +# ██████ ██████░██ +# ░░░░██ ██░░░░ ░██████ +# ██ ░░█████ ░██░░░██ +# ██ ░░░░░██░██ ░██ +# ██████ ██████ ░██ ░██ +# ░░░░░░ ░░░░░░ ░░ ░░ +# +# ▓▓▓▓▓▓▓▓▓▓ +# ░▓ author ▓ xero <x@xero.nu> +# ░▓ code ▓ http://code.xero.nu/dotfiles +# ░▓ mirror ▓ http://git.io/.files +# ░▓▓▓▓▓▓▓▓▓▓ +# ░░░░░░░░░░ +# +#█▓▒░ colors for permissions +if [[ "$EUID" -ne "0" ]] +then # if user is not root + USER_LEVEL="%F{cyan}" +else # root! + USER_LEVEL="%F{red}" +fi + +#█▓▒░ allow functions in the prompt +setopt PROMPT_SUBST + +#█▓▒░ autoload zsh functions +fpath=(~/.zsh/functions $fpath) +autoload -U ~/.zsh/functions/*(:t) + +#█▓▒░ enable auto-execution of functions +typeset -ga preexec_functions +typeset -ga precmd_functions +typeset -ga chpwd_functions + +#█▓▒░ prepend git functions needed for prompt +preexec_functions+='preexec_update_git_vars' +precmd_functions+='precmd_update_git_vars' +chpwd_functions+='chpwd_update_git_vars' diff --git a/zsh/.zsh/dual-line-prompt._zsh b/zsh/.zsh/dual-line-prompt._zsh new file mode 100755 index 0000000..1888a3a --- /dev/null +++ b/zsh/.zsh/dual-line-prompt._zsh @@ -0,0 +1,19 @@ +# ██ +# ░██ +# ██████ ██████░██ +# ░░░░██ ██░░░░ ░██████ +# ██ ░░█████ ░██░░░██ +# ██ ░░░░░██░██ ░██ +# ██████ ██████ ░██ ░██ +# ░░░░░░ ░░░░░░ ░░ ░░ +# +# ▓▓▓▓▓▓▓▓▓▓ +# ░▓ author ▓ xero <x@xero.nu> +# ░▓ code ▓ http://code.xero.nu/dotfiles +# ░▓ mirror ▓ http://git.io/.files +# ░▓▓▓▓▓▓▓▓▓▓ +# ░░░░░░░░░░ +# +#█▓▒░dual line prompt +PROMPT='${USER_LEVEL}┌[%F{white}%n@%M${USER_LEVEL}]─[%F{white}%~${USER_LEVEL}]$(prompt_git_info) +${USER_LEVEL}└─ - %F{white}' diff --git a/zsh/.zsh/functions/chpwd_update_git_vars b/zsh/.zsh/functions/chpwd_update_git_vars index 2cc7ffa..2cc7ffa 100644..100755 --- a/zsh/.zsh/functions/chpwd_update_git_vars +++ b/zsh/.zsh/functions/chpwd_update_git_vars diff --git a/zsh/.zsh/functions/precmd_update_git_vars b/zsh/.zsh/functions/precmd_update_git_vars index 7fa32df..7fa32df 100644..100755 --- a/zsh/.zsh/functions/precmd_update_git_vars +++ b/zsh/.zsh/functions/precmd_update_git_vars diff --git a/zsh/.zsh/functions/preexec_update_git_vars b/zsh/.zsh/functions/preexec_update_git_vars index 998de21..998de21 100644..100755 --- a/zsh/.zsh/functions/preexec_update_git_vars +++ b/zsh/.zsh/functions/preexec_update_git_vars diff --git a/zsh/.zsh/functions/prompt_git_info b/zsh/.zsh/functions/prompt_git_info index d6d3acb..d6d3acb 100644..100755 --- a/zsh/.zsh/functions/prompt_git_info +++ b/zsh/.zsh/functions/prompt_git_info diff --git a/zsh/.zsh/functions/update_current_git_vars b/zsh/.zsh/functions/update_current_git_vars index 716d984..716d984 100644..100755 --- a/zsh/.zsh/functions/update_current_git_vars +++ b/zsh/.zsh/functions/update_current_git_vars diff --git a/zsh/.zsh/history.zsh b/zsh/.zsh/history.zsh new file mode 100755 index 0000000..eec299f --- /dev/null +++ b/zsh/.zsh/history.zsh @@ -0,0 +1,24 @@ +# ██ +# ░██ +# ██████ ██████░██ +# ░░░░██ ██░░░░ ░██████ +# ██ ░░█████ ░██░░░██ +# ██ ░░░░░██░██ ░██ +# ██████ ██████ ░██ ░██ +# ░░░░░░ ░░░░░░ ░░ ░░ +# +# ▓▓▓▓▓▓▓▓▓▓ +# ░▓ author ▓ xero <x@xero.nu> +# ░▓ code ▓ http://code.xero.nu/dotfiles +# ░▓ mirror ▓ http://git.io/.files +# ░▓▓▓▓▓▓▓▓▓▓ +# ░░░░░░░░░░ +# +#█▓▒░ history +HISTFILE=~/.zhistory +setopt APPEND_HISTORY +HISTSIZE=1200 +SAVEHIST=1000 +setopt HIST_EXPIRE_DUPS_FIRST +setopt EXTENDED_HISTORY +setopt SHARE_HISTORY diff --git a/zsh/.zsh/keybindings.zsh b/zsh/.zsh/keybindings.zsh new file mode 100755 index 0000000..2f80417 --- /dev/null +++ b/zsh/.zsh/keybindings.zsh @@ -0,0 +1,51 @@ +# ██ +# ░██ +# ██████ ██████░██ +# ░░░░██ ██░░░░ ░██████ +# ██ ░░█████ ░██░░░██ +# ██ ░░░░░██░██ ░██ +# ██████ ██████ ░██ ░██ +# ░░░░░░ ░░░░░░ ░░ ░░ +# +# ▓▓▓▓▓▓▓▓▓▓ +# ░▓ author ▓ xero <x@xero.nu> +# ░▓ code ▓ http://code.xero.nu/dotfiles +# ░▓ mirror ▓ http://git.io/.files +# ░▓▓▓▓▓▓▓▓▓▓ +# ░░░░░░░░░░ +# +#█▓▒░ keybindings +typeset -A key + +key[Home]=${terminfo[khome]} +key[End]=${terminfo[kend]} +key[Insert]=${terminfo[kich1]} +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]} + +[[ -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[Delete]}" ]] && bindkey "${key[Delete]}" delete-char +[[ -n "${key[Up]}" ]] && bindkey "${key[Up]}" up-line-or-history +[[ -n "${key[Down]}" ]] && bindkey "${key[Down]}" down-line-or-history +[[ -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 + +if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then + function zle-line-init () { + printf '%s' "${terminfo[smkx]}" + } + function zle-line-finish () { + printf '%s' "${terminfo[rmkx]}" + } + zle -N zle-line-init + zle -N zle-line-finish +fi diff --git a/zsh/.zsh/keychain.zsh b/zsh/.zsh/keychain.zsh new file mode 100755 index 0000000..ea287b8 --- /dev/null +++ b/zsh/.zsh/keychain.zsh @@ -0,0 +1,18 @@ +# ██ +# ░██ +# ██████ ██████░██ +# ░░░░██ ██░░░░ ░██████ +# ██ ░░█████ ░██░░░██ +# ██ ░░░░░██░██ ░██ +# ██████ ██████ ░██ ░██ +# ░░░░░░ ░░░░░░ ░░ ░░ +# +# ▓▓▓▓▓▓▓▓▓▓ +# ░▓ author ▓ xero <x@xero.nu> +# ░▓ code ▓ http://code.xero.nu/dotfiles +# ░▓ mirror ▓ http://git.io/.files +# ░▓▓▓▓▓▓▓▓▓▓ +# ░░░░░░░░░░ +# +#█▓▒░ ssh keys +export SSH_KEY_PATH="~/.ssh/id_rsa" diff --git a/zsh/.zsh/minimal-prompt.zsh b/zsh/.zsh/minimal-prompt.zsh new file mode 100755 index 0000000..8c62d54 --- /dev/null +++ b/zsh/.zsh/minimal-prompt.zsh @@ -0,0 +1,18 @@ +# ██ +# ░██ +# ██████ ██████░██ +# ░░░░██ ██░░░░ ░██████ +# ██ ░░█████ ░██░░░██ +# ██ ░░░░░██░██ ░██ +# ██████ ██████ ░██ ░██ +# ░░░░░░ ░░░░░░ ░░ ░░ +# +# ▓▓▓▓▓▓▓▓▓▓ +# ░▓ author ▓ xero <x@xero.nu> +# ░▓ code ▓ http://code.xero.nu/dotfiles +# ░▓ mirror ▓ http://git.io/.files +# ░▓▓▓▓▓▓▓▓▓▓ +# ░░░░░░░░░░ +# +#█▓▒░ minial prompt +PROMPT='${USER_LEVEL}[%F{white}%~${USER_LEVEL}]$(prompt_git_info)── -%f ' diff --git a/zsh/.zsh/ninja-prompt._zsh b/zsh/.zsh/ninja-prompt._zsh new file mode 100755 index 0000000..be95bc5 --- /dev/null +++ b/zsh/.zsh/ninja-prompt._zsh @@ -0,0 +1,22 @@ +# ██ +# ░██ +# ██████ ██████░██ +# ░░░░██ ██░░░░ ░██████ +# ██ ░░█████ ░██░░░██ +# ██ ░░░░░██░██ ░██ +# ██████ ██████ ░██ ░██ +# ░░░░░░ ░░░░░░ ░░ ░░ +# +# ▓▓▓▓▓▓▓▓▓▓ +# ░▓ author ▓ xero <x@xero.nu> +# ░▓ code ▓ http://code.xero.nu/dotfiles +# ░▓ mirror ▓ http://git.io/.files +# ░▓▓▓▓▓▓▓▓▓▓ +# ░░░░░░░░░░ +# +#█▓▒░ ninja prompt +PROMPT='%F{white} ▟▙ ${USER_LEVEL}%~%F{white}$(prompt_git_info) %F{white} +▟▒${USER_LEVEL}░░░░░░░%F{white}▜▙▜████████████████████████████████▛ +▜▒${USER_LEVEL}░░░░░░░%F{white}▟▛▟▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▛ + ▜▛ + %F{white}' diff --git a/zsh/.zsh/nodejs.zsh b/zsh/.zsh/nodejs.zsh new file mode 100755 index 0000000..269109e --- /dev/null +++ b/zsh/.zsh/nodejs.zsh @@ -0,0 +1,18 @@ +# ██ +# ░██ +# ██████ ██████░██ +# ░░░░██ ██░░░░ ░██████ +# ██ ░░█████ ░██░░░██ +# ██ ░░░░░██░██ ░██ +# ██████ ██████ ░██ ░██ +# ░░░░░░ ░░░░░░ ░░ ░░ +# +# ▓▓▓▓▓▓▓▓▓▓ +# ░▓ author ▓ xero <x@xero.nu> +# ░▓ code ▓ http://code.xero.nu/dotfiles +# ░▓ mirror ▓ http://git.io/.files +# ░▓▓▓▓▓▓▓▓▓▓ +# ░░░░░░░░░░ +# +#█▓▒░ node version manager +source ~/.nvm/nvm.sh diff --git a/zsh/.zsh/settings.zsh b/zsh/.zsh/settings.zsh new file mode 100755 index 0000000..b2777dd --- /dev/null +++ b/zsh/.zsh/settings.zsh @@ -0,0 +1,29 @@ +# ██ +# ░██ +# ██████ ██████░██ +# ░░░░██ ██░░░░ ░██████ +# ██ ░░█████ ░██░░░██ +# ██ ░░░░░██░██ ░██ +# ██████ ██████ ░██ ░██ +# ░░░░░░ ░░░░░░ ░░ ░░ +# +# ▓▓▓▓▓▓▓▓▓▓ +# ░▓ author ▓ xero <x@xero.nu> +# ░▓ code ▓ http://code.xero.nu/dotfiles +# ░▓ mirror ▓ http://git.io/.files +# ░▓▓▓▓▓▓▓▓▓▓ +# ░░░░░░░░░░ +# +#█▓▒░ timestamps +#HIST_STAMPS="mm/dd/yyyy" + +#█▓▒░ paths +export PATH=$HOME/bin:/usr/local/bin:/home/xero/.gem/ruby/2.2.0/bin:$PATH +#export MANPATH="/usr/local/man:$MANPATH" + +#█▓▒░ preferred editor for local and remote sessions +export EDITOR='vim' +export VISUAL='vim' + +#█▓▒░ language +export LC_CTYPE=en_US.utf8 diff --git a/zsh/.zshrc b/zsh/.zshrc index 72b5d47..f3bbffb 100644..100755 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -14,176 +14,5 @@ # ░▓▓▓▓▓▓▓▓▓▓ # ░░░░░░░░░░ # -# █▓▒░ timestamps -# HIST_STAMPS="mm/dd/yyyy" - -#█▓▒░ paths -export PATH=$HOME/bin:/usr/local/bin:/home/xero/.gem/ruby/2.2.0/bin:$PATH -# export MANPATH="/usr/local/man:$MANPATH" - -#█▓▒░ preferred editor for local and remote sessions -if [[ -n $SSH_CONNECTION ]]; then - export EDITOR='vim' -else - export EDITOR='vim' -fi - -#█▓▒░ language -export LC_CTYPE=en_US.utf8 - -#█▓▒░ ssh keys -export SSH_KEY_PATH="~/.ssh/id_rsa" - -#█▓▒░ aliases -alias ls="ls --color=auto" -alias lsla="ls -la --color=auto" -alias lsls="ls -la --color=auto" -alias lsl="ls -l --color=auto" -alias "cd.."="cd ../" -alias up="cd ../" -alias rock="ncmpcpp" -alias mixer="alsamixer" -alias checkrootkits="sudo rkhunter --update; sudo rkhunter --propupd; sudo rkhunter --check" -alias checkvirus="clamscan --recursive=yes --infected /home" -alias updateantivirus="sudo freshclam" -alias genplaylist="cd ~/music;find . -name '*.mp3' -o -name '*.flac'|sed -e 's%^./%%g' > ~/.mpd/playlists/all.m3u" -alias matrix="cmatrix -b" -alias pipes="bash ~/code/fun/pipes" -alias pipesx="bash ~/code/fun/pipesx" -alias rain="bash ~/code/fun/rain" -alias screenfetch="~/code/sys/info" -alias hashcompare="bash ~/code/sys/hash-compare " -alias tempwatch="while :; do sensors; sleep 1 && clear; done;" -alias term="urxvtc -hold -e " #used for awesomewm run menu -alias tmx="bash ~/code/sys/tmx" -alias fixcursor="xsetroot -cursor_name left_ptr" -alias img="bash ~/code/sys/img" -alias gitio="bash ~/code/sys/gitio" -alias ix="bash ~/code/sys/ix" -alias ioup="~/code/sys/ioup" -alias sprunge="curl -F 'sprunge=<-' http://sprunge.us" -alias clbin="curl -F 'clbin=<-' https://clbin.com" -alias irc="dtach -A /home/xero/save/irc zsh" -alias toiletlist='for i in ${TOILET_FONT_PATH:=/usr/share/figlet}/*.{t,f}lf; do j=${i##*/}; echo ""; echo "╓───── "$j; echo "╙────────────────────────────────────── ─ ─ "; echo ""; toilet -d "${i%/*}" -f "$j" "${j%.*}"; done' -alias ascii="toilet -f 3d" -alias metal="toilet -f 3d --metal" -alias pacman="sudo pacman" -alias apachereload='sudo systemctl restart httpd.service' -alias disks='echo "╓───── m o u n t . p o i n t s"; echo "╙────────────────────────────────────── ─ ─ "; lsblk -a; echo ""; echo "╓───── d i s k . u s a g e"; echo "╙────────────────────────────────────── ─ ─ "; df -h;' - -#█▓▒░ games -alias doom='gzdoom brutal19.pk3' -alias fez='~/fez/FEZ' - -#█▓▒░ keybindings -typeset -A key - -key[Home]=${terminfo[khome]} -key[End]=${terminfo[kend]} -key[Insert]=${terminfo[kich1]} -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]} - -[[ -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[Delete]}" ]] && bindkey "${key[Delete]}" delete-char -[[ -n "${key[Up]}" ]] && bindkey "${key[Up]}" up-line-or-history -[[ -n "${key[Down]}" ]] && bindkey "${key[Down]}" down-line-or-history -[[ -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 - -if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then - function zle-line-init () { - printf '%s' "${terminfo[smkx]}" - } - function zle-line-finish () { - printf '%s' "${terminfo[rmkx]}" - } - zle -N zle-line-init - zle -N zle-line-finish -fi - -#█▓▒░ autocompletion systems -autoload -Uz compinit -compinit - -zstyle ':completion:*' auto-description 'specify: %d' -zstyle ':completion:*' completer _expand _complete _correct _approximate -zstyle ':completion:*' format 'Completing %d' -zstyle ':completion:*' group-name '' -zstyle ':completion:*' menu select=2 eval "$(dircolors -b)" -zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} -zstyle ':completion:*' list-colors '' -zstyle ':completion:*' list-prompt %SAt %p: hit TAB for more, or the character to insert%s -zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=* l:|=*' -zstyle ':completion:*' menu select=long -zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s -zstyle ':completion:*' use-compctl false -zstyle ':completion:*' verbose true - -zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31' -zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd' - -#█▓▒░ colors for permissions -if [[ "$EUID" -ne "0" ]] ; then # if user is not root - USER_LEVEL="%F{cyan}" -else # root! - USER_LEVEL="%F{red}" -fi - -#█▓▒░ allow functions in the prompt -setopt PROMPT_SUBST - -#█▓▒░ autoload zsh functions -fpath=(~/.zsh/functions $fpath) -autoload -U ~/.zsh/functions/*(:t) - -#█▓▒░ enable auto-execution of functions -typeset -ga preexec_functions -typeset -ga precmd_functions -typeset -ga chpwd_functions - -#█▓▒░ append git functions needed for prompt. -preexec_functions+='preexec_update_git_vars' -precmd_functions+='precmd_update_git_vars' -chpwd_functions+='chpwd_update_git_vars' - #█▓▒░ load configs -for config_file (~/.zsh/*.zsh) source $config_file - -#█▓▒░ history -HISTFILE=~/.zhistory -setopt APPEND_HISTORY -HISTSIZE=1200 -SAVEHIST=1000 -setopt HIST_EXPIRE_DUPS_FIRST -setopt EXTENDED_HISTORY -setopt SHARE_HISTORY - -#█▓▒░ node version manager -#source ~/.nvm/nvm.sh - -#█▓▒░ custom prompts - -#█▓▒░dual line -PROMPT="${USER_LEVEL}┌[%F{white}%n@%M${USER_LEVEL}]─[%F{white}%~${USER_LEVEL}] -${USER_LEVEL}└─ %F{white}" -#RPROMPT="${USER_LEVEL}[%F{white}%n@%M${USER_LEVEL}]" - -#█▓▒░ ninja -PROMPT="%F{white} ▟▙ ${USER_LEVEL}%~%F{white} -▟▒${USER_LEVEL}░░░░░░░%F{white}▜▙▜████████████████████████████████▛ -▜▒${USER_LEVEL}░░░░░░░%F{white}▟▛▟▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▛ - ▜▛ - %F{white}" - -#█▓▒░ minial -PROMPT='${USER_LEVEL}[%F{white}%~${USER_LEVEL}]$(prompt_git_info)── -%f ' +for config (~/.zsh/*.zsh) source $config |