diff --git a/rainbow-alias.plugin.zsh b/rainbow-alias.plugin.zsh new file mode 100644 index 0000000..d24f230 --- /dev/null +++ b/rainbow-alias.plugin.zsh @@ -0,0 +1,34 @@ + + +if (( $+commands[lsd] )); then + alias ls='lsd --color=auto' +else + alias ls='ls --color=auto' +fi +alias ll='ls -al' + +if (( $+commands[pacman-mirrors] )); then + updmirror='sudo pacman-mirrors -f0 && sudo pacman -Sy' +fi + +if (( $+commands[pacman-mirrors] )); then + updmirror='sudo reflector -l 200 -n 20 -p http --sort rate --save /etc/pacman.d/mirrorlist && sudo pacman -Sy' +fi + +if (( $+commands[yay] )); then + alias update='yay -Syyu --noconfirm' +fi + +if (( $+commands[pacman] )); then + alias update='pacman -Syyu --noconfirm' +fi + +if (( $+commands[apt] )); then + alias update='sudo apt update; sudo apt upgrade -y' +fi + +if [[ '$TERM' != screen* ]]; then + if (( $+commands[neofetch] )); then + neofetch + fi +fi \ No newline at end of file