💾 Archived View for ait.place › dot › shell › .config › shell › aliasrc.txt captured on 2022-01-08 at 14:28:43.
⬅️ Previous capture (2021-12-03)
-=-=-=-=-=-=-
#!/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" # sudo not required for some system commands for x in mount umount pacman updatedb ; do alias $x="sudo $x" done # Verbosity and settings that you pretty much just always are going to want. alias \ bat="cat /sys/class/power_supply/cw2015-battery/capacity" \ cp="cp -iv" \ mv="mv -iv" \ rm="rm -vI" \ bc="bc -ql" \ mkd="mkdir -pv" \ ddg="ddgr --unsafe" \ yt="youtube-dl --add-metadata -i" \ yta="yt -x -f bestaudio/best" \ ffmpeg="ffmpeg -hide_banner" # Colorize commands when possible. alias \ ls="ls -hNX --color=auto" \ grep="grep --color=auto" \ diff="diff --color=auto" \ ip="ip -c=auto" \ ccat="highlight --out-format=ansi" # These common commands are just too long! Abbreviate them. alias \ ka="killall" \ g="git" \ la="ls -A" \ ll="ls -lA" \ trem="transmission-remote" \ r="tuir -s" \ lsf="r livestreamfail" \ sdn="sudo shutdown -h now" \ cdp="cd -P" f="$FILE" \ e="$EDITOR" \ v="$EDITOR" \ z="zathura" \ p="sudo pacman" \ SS="sudo systemctl" # Some other stuff alias \ magit="nvim -c MagitOnly" \ tmux="tmux -f $XDG_CONFIG_HOME/tmux/tmux.conf" \ doom="doom --doomdir $XDG_CONFIG_HOME/doom" \ "nvidia-settings"="nvidia-settings --config=$XDG_CONFIG_HOME/nvidia/settings" \ sloccount="sloccount --datadir $XDG_CACHE_HOME/sloccount" \ abook="abook --config "$XDG_CONFIG_HOME"/abook/abookrc --datafile "$XDG_DATA_HOME"/abook/addressbook" \ wget="wget --hsts-file=$XDG_CACHE_HOME/wget-hsts" vic() { file="$(which $*)" && $EDITOR $file || echo "$file"; } mpva() { mpv --ytdl-format=bestaudio --force-window=no ytdl://ytsearch:"$*"; } mpvv() { mpv ytdl://ytsearch:"$*"; }