1
0
Fork 0

retab aliases, add tldr -s alias

This commit is contained in:
Luca Bilke 2024-01-02 19:02:59 +01:00
parent ee07e0f5c2
commit 449898299b
1 changed files with 26 additions and 27 deletions

View File

@ -2,39 +2,40 @@
# shellcheck disable=SC2142 # shellcheck disable=SC2142
# sudo not required for some system commands # sudo not required for some system commands
for command in mount umount sv pacman xbps-install xbps-remove apt aptitude updatedb su shutdown poweroff reboot; do for command in mount umount sv pacman xbps-install xbps-remove apt aptitude updatedb su shutdown poweroff reboot; do
command -v $command 1>/dev/null 2>&1 && alias $command="sudo $command" command -v $command 1>/dev/null 2>&1 && alias $command="sudo $command"
done done
unset command unset command
# Verbosity and settings that you pretty much just always are going to want. # Verbosity and settings that you pretty much just always are going to want.
alias \ alias \
vim="nvim" \ vim="nvim" \
cp="cp -iv" \ cp="cp -iv" \
mv="mv -iv" \ mv="mv -iv" \
rm="rm -vI" \ rm="rm -vI" \
bc="bc -ql" \ bc="bc -ql" \
mkd="mkdir -pv" \ mkd="mkdir -pv" \
ffmpeg="ffmpeg -hide_banner" \ ffmpeg="ffmpeg -hide_banner" \
grep="grep --color=auto" \ grep="grep --color=auto" \
diff="diff --color=auto" \ diff="diff --color=auto" \
nvidia-settings="nvidia-settings --config=$XDG_CONFIG_HOME/nvidia/settings" nvidia-settings="nvidia-settings --config=$XDG_CONFIG_HOME/nvidia/settings" \
tldr="tldr -s"
# Colorize commands when possible. # Colorize commands when possible.
alias \ alias \
ls="ls -hN --color=auto --group-directories-first" \ ls="ls -hN --color=auto --group-directories-first" \
grep="grep --color=auto" \ grep="grep --color=auto" \
diff="diff --color=auto" \ diff="diff --color=auto" \
ccat="highlight --out-format=ansi" \ ccat="highlight --out-format=ansi" \
ip="ip -color=auto" ip="ip -color=auto"
# These common commands are just too long! Abbreviate them. # These common commands are just too long! Abbreviate them.
alias \ alias \
ka="killall" \ ka="killall" \
e="$EDITOR" \ e="$EDITOR" \
z="zathura" z="zathura"
if command -v pacman 1>/dev/null 2>&1; then if command -v pacman 1>/dev/null 2>&1; then
alias p="pacman" alias p="pacman"
fi fi
if command -v apt 1>/dev/null 2>&1; then if command -v apt 1>/dev/null 2>&1; then
@ -50,19 +51,17 @@ fi
if command -v xbps-install 1>/dev/null 2>&1; then if command -v xbps-install 1>/dev/null 2>&1; then
alias \ alias \
xin="xbps-install" \ xin="xbps-install" \
xup="xbps-install -Syu" \ xup="xbps-install -Syu" \
xre="xbps-remove" \ xre="xbps-remove" \
xse="xbps-query -Rs" xse="xbps-query -Rs"
fi fi
# Misc. # Misc.
alias \ alias \
ll="ls -lhpAN --color=auto --group-directories-first" \ ll="ls -lhpAN --color=auto --group-directories-first" \
xgetkeys="xev | sed -ne '/^KeyPress/,/^$/p'" \ xgetkeys="xev | sed -ne '/^KeyPress/,/^$/p'" \
whed='() { $EDITOR $(which "$1") }' \ whed='() { $EDITOR $(which "$1") }' \
xpick=" xprop | awk ' xpick=" xprop | awk '
/^WM_CLASS/{sub(/.* =/, \"instance:\"); sub(/,/, \"\nclass:\"); print} /^WM_CLASS/{sub(/.* =/, \"instance:\"); sub(/,/, \"\nclass:\"); print}
/^WM_NAME/{sub(/.* =/, \"title:\"); print}'" /^WM_NAME/{sub(/.* =/, \"title:\"); print}'"