Fixed bugs

Added paru installation
Switchted to hyprlock
This commit is contained in:
2024-04-10 22:22:50 +02:00
parent b39e579c51
commit d46e7c8dad
172 changed files with 1897 additions and 123 deletions

View File

@@ -2,7 +2,20 @@
[[ $- != *i* ]] && return
# Load starship prompt if starship is installed
eval "$(starship init bash)"
if [ -f /usr/bin/starship ]; then
eval "$(starship init bash)"
fi
## Functions
# Yazi
function ya() {
local tmp="$(mktemp -t "yazi-cwd.XXXXX")"
yazi "$@" --cwd-file="$tmp"
if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
cd -- "$cwd"
fi
rm -f -- "$tmp"
}
## Aliases
# Replace ls with eza
@@ -13,17 +26,22 @@ alias lt='eza -aT --color=always --group-directories-first' # tree listing
alias l.='eza -ald --color=always --group-directories-first .*' # show only dotfiles
# Replace cat with bat
alias cat='bat --style header --style snip --style changes --style header'
if [ -f /usr/bin/bat ]; then
alias cat='bat --style header --style snip --style changes --style header'
fi
# Replace yay with paru
[ ! -x /usr/bin/yay ] && [ -x /usr/bin/paru ] && alias yay='paru'
if [ -f /usr/bin/paru ]; then
alias yay='paru'
fi
# Aliases
alias :q='exit'
alias cls='clear'
alias dir='dir --color=auto'
alias egrep='grep -E --color=auto'
alias fgrep='grep -F --color=auto'
alias igrep='grep -i --color=auto'
alias grepe='grep -E --color=auto'
alias grepf='grep -F --color=auto'
alias grepi='grep -i --color=auto'
alias fixpacman="sudo rm /var/lib/pacman/db.lck"
alias grep='grep --color=auto'
alias grubup="sudo update-grub"
@@ -33,8 +51,6 @@ alias psmem='ps auxf | sort -nr -k 4'
alias rmpkg="sudo pacman -Rdd"
alias tarnow='tar -acf '
alias untar='tar -zxvf '
alias upd='/usr/bin/update'
alias vdir='vdir --color=auto'
alias wget='wget -c '
# Cleanup orphaned packages