2020-09-24 18:35:43 +02:00
|
|
|
alias ls='ls --color'
|
2018-03-16 12:02:58 +01:00
|
|
|
alias grep='grep --color'
|
|
|
|
|
|
|
|
source $ZDOTDIR/rc.os/prompt.zsh
|
|
|
|
|
|
|
|
|
|
|
|
# permit parameter expansion, command substitution and arithmetic expansion
|
|
|
|
# in prompt
|
|
|
|
setopt prompt_subst
|
|
|
|
|
|
|
|
precmd () {
|
|
|
|
local buffer load
|
|
|
|
load=(${$(< /proc/loadavg)})
|
|
|
|
LOADAVG="$load[1]"
|
|
|
|
buffer=(${$(free)})
|
|
|
|
MEM="$((100 * $buffer[16] / $buffer[8]))%%"
|
|
|
|
|
|
|
|
set_title zsh
|
|
|
|
}
|
|
|
|
|
|
|
|
# zstyle OS specific
|
|
|
|
eval `dircolors $ZDOTDIR/misc/dircolors.rc`
|
|
|
|
|
|
|
|
# Use LS_COLORS for color completion
|
|
|
|
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
|
|
|
|
|
|
|
|
# Distrib specific
|
|
|
|
[ -r /etc/debian_version ] && source $ZDOTDIR/rc.os/Debian.zsh
|
|
|
|
[ -e /etc/arch-release ] && source $ZDOTDIR/rc.os/Arch.zsh
|