56 lines
1.7 KiB
Bash
56 lines
1.7 KiB
Bash
#!/bin/sh
|
|
|
|
# Use $XINITRC variable if file exists.
|
|
[ -f "$XINITRC" ] && alias startx="startx $XINITRC"
|
|
|
|
# sudo not required for some system commands
|
|
for command in mount umount sv pacman apt updatedb su shutdown poweroff reboot ; do
|
|
alias $command="sudo $command"
|
|
done; unset command
|
|
|
|
# Verbosity and settings that you pretty much just always are going to want.
|
|
alias \
|
|
cp="cp -iv" \
|
|
mv="mv -iv" \
|
|
rm="rm -vI" \
|
|
bc="bc -ql" \
|
|
mkd="mkdir -pv" \
|
|
ffmpeg="ffmpeg -hide_banner" \
|
|
exa="exa -abghHliS" \
|
|
duf="duf -all" \
|
|
lock='slock -m "$(cowsay "$(fortune)" | lolcat -ft)"' \
|
|
ls="ls -hN --color=auto --group-directories-first" \
|
|
grep="grep --color=auto" \
|
|
diff="diff --color=auto" \
|
|
|
|
|
|
# Colorize commands when possible.
|
|
alias \
|
|
ls="ls -hN --color=auto --group-directories-first" \
|
|
grep="grep --color=auto" \
|
|
diff="diff --color=auto" \
|
|
ccat="highlight --out-format=ansi" \
|
|
ip="ip -color=auto"
|
|
|
|
# These common commands are just too long! Abbreviate them.
|
|
alias \
|
|
ka="killall" \
|
|
e="$EDITOR" \
|
|
z="zathura" \
|
|
p="pacman" \
|
|
au="apt uninstall" \
|
|
ar="apt reinstall" \
|
|
ai="apt install" \
|
|
aur="apt autoremove" \
|
|
kssh="kitty +kitten ssh"
|
|
|
|
# Misc.
|
|
alias \
|
|
ref="shortcuts >/dev/null; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc" \
|
|
weath="less -S ${XDG_DATA_HOME:-$HOME/.local/share}/weatherreport" \
|
|
remvirt="virt-manager -c 'qemu+ssh://luca@192.168.178.200/system'" \
|
|
vim="lvim" \
|
|
wikidown='rclone sync cloud:files/luca/Notes ~/Documents/vimwiki' \
|
|
wikiup='rclone sync ~/Documents/vimwiki cloud:files/luca/Notes' \
|
|
cam="mpv --untimed --no-cache --no-osc --no-input-default-bindings --profile=low-latency --input-conf=/dev/null --title=webcam $(ls /dev/video[0,2,4,6,8] | tail -n 1)"
|