Files
artix-install-script/config-files/zshrc
T

54 lines
1.6 KiB
Bash

# shell settings (this section impacts shell functionality)
HISTFILE="$XDG_CACHE_HOME"/zsh-histfile
HISTSIZE=2500
SAVEHIST=2000
setopt INC_APPEND_HISTORY
setopt HIST_EXPIRE_DUPS_FIRST
setopt HIST_FIND_NO_DUPS
unsetopt beep
bindkey -e
zstyle :compinstall filename "/home/$USER/.zshrc"
autoload -Uz compinit
compinit
PS1='%F{cyan}%n%f@%F{cyan}%m:%f%1~%f%F{cyan}|%#%f '
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
bindkey '^[[H' beginning-of-line
bindkey '^[[F' end-of-line
bindkey '^[[3~' delete-char
# random text art (this section can be safely deleted)
art_cat='%F{214}/\_,_/\
\ 0 0 /%f'
art_dog=' %F{222}/___/
| 6.6 |%f'
art_bear='%F{172}() ()
(o.o)%f'
art_snail=' %F{114}|_/
/o o\%f'
art_bunny=' /_/
|^.^|'
art_jellyfish='%F{183}<===>
//|\\%f'
art_school=' %F{214}<°))>< %F{222}><(((.>
%F{114}><(((°> %F{183}><((((°>%f'
art_array=("$art_cat" "$art_dog" "$art_bear" "$art_snail" "$art_bunny" "$art_jellyfish" "$art_school")
print -Pr "$art_array[$((RANDOM%7+1))]"
function term_clear() {
clear
print -Pr "$art_array[$((RANDOM%7+1))]"
print -Pn $PS1
}
zle -N zsh-redraw term_clear
bindkey "^L" zsh-redraw
# aliases
alias ls='ls --color=auto'
alias orphans='doas pacman -Rcns $(pacman -Qqdt)'
alias powersave='doas /usr/local/bin/powerset.sh powersave'
alias performance='doas /usr/local/bin/powerset.sh performance'
alias schedutil='doas /usr/local/bin/powerset.sh schedutil'
alias ondemand='doas /usr/local/bin/powerset.sh ondemand'
alias poweroff='doas /usr/bin/poweroff'
alias reboot='doas /usr/bin/reboot'