dotfiles/.config/shell/aliasrc

51 lines
1.5 KiB
Plaintext
Raw Normal View History

2024-04-23 04:34:15 +02:00
#!/bin/sh
# Use neovim for vim if present.
[ -x "$(command -v nvim)" ] && alias vim="nvim" vimdiff="nvim -d"
# Use $XINITRC variable if file exists.
[ -f "$XINITRC" ] && alias startx="startx \$XINITRC"
alias svn="svn --config-dir \"$XDG_CONFIG_HOME\"/subversion"
2024-06-29 08:48:30 +02:00
alias adb='HOME="$XDG_DATA_HOME"/android adb'
2024-04-23 04:34:15 +02:00
# sudo not required for some system commands
for command in mount umount pacman updatedb su shutdown poweroff reboot; do
alias $command="sudo $command"
done
unset command
alias \
2024-05-18 10:39:14 +02:00
be="fzf-fd \$HOME/.local/bin | xargs -r nvim" \
ce="confedit" \
2024-04-23 04:34:15 +02:00
cg="fzf-grep \$HOME/.config" \
2024-05-18 10:39:14 +02:00
fe="fzf-fd \$(pwd) | xargs -r nvim" \
2024-04-23 04:34:15 +02:00
fg="fzf-grep \$(pwd)" \
cp="cp -iv" \
mv="mv -iv" \
rm="rm -vI" \
ka="killall" \
g="git" \
sdn="shutdown -h now" \
v="\$EDITOR" \
p="pacman" \
z="zathura" \
x="exit" \
mkd="mkdir -pv" \
ls="eza --icons --group-directories-first" \
lss="lsd -lt --total-size --group-directories-first" \
lsa="eza -a --icons --group-directories-first" \
lsas="lsd -lAt --total-size --group-directories-first" \
lst="eza -T --icons" \
grep="grep --color=auto" \
diff="diff --color=auto" \
ccat="highlight --out-format=ansi" \
ip="ip -color=auto" \
cat="bat -pp" \
yt="yt-dlp --embed-metadata -i" \
yta="yt -x -f bestaudio/best" \
ffmpeg="ffmpeg -hide_banner" \
ref="shortcuts >/dev/null; source \${XDG_CONFIG_HOME:-\$HOME/.config}/shell/shortcutrc ; source \${XDG_CONFIG_HOME:-\$HOME/.config}/shell/zshnameddirrc" \
weath="curl wttr.in | head -n -1 | cat" \
weath2="curl v2.wttr.in | head -n -1 | cat"