#!/bin/sh # Filip's aliasrc # Use $XINITRC variable if file exists. [ -f "$XINITRC" ] && alias startx="startx \$XINITRC" # sudo not required for some system commands sudo_cmds="mount umount sv apt apt-get aptitude dpkg shutdown poweroff reboot cryptsetup" for command in $sudo_cmds; 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" \ crontab="crontab -i" \ journalctl="journalctl -xe" \ less="less -XER" \ ls="lsn" \ mkdir="mkdir -pv" \ mv="mv -iv" \ pstree="pstree -np" \ rm="logrm -vI" \ rmdir="rmdir -vp" \ rsync="rsync -vrPlu" \ vim="nvim" # Colorize commands when possible. alias \ ccat="highlight --out-format=ansi" \ diff="diff --color=auto" \ dir="dir --color=auto" \ egrep="egrep --color=auto" \ fgrep="fgrep --color=auto" \ grep="grep --color=auto" \ ip="ip -color=auto" \ vdir="vdir --color=auto" # Making stuff easy to customize and source automatically alias \ vrc='$EDITOR "$HOME/.config/nvim/init.lua"' \ zal='$EDITOR "$ZDOTDIR/aliasrc" && source "$ZDOTDIR/aliasrc"' \ zen='$EDITOR "$ZDOTDIR/envvarrc" && source "$ZDOTDIR/envvarrc"' \ zrc='$EDITOR "$ZDOTDIR/.zshrc" && source "$ZDOTDIR/.zshrc"' # Aliases for connecting to server alias \ ctg="ssh git@rabiega.xyz" \ cts="ssh root@rabiega.xyz" \ ctc="ssh root@chadguide.site" # Making stuff shorter alias \ ..="cd .." \ bat="batcat" \ copy="xsel -ib" \ fd="fdfind" \ ipy="ipython3" \ lw="librewolf & exit -f" \ nbadd='cat >> "$XDG_CONFIG_HOME"/newsboat/urls << EOF' \ py="python3" \ sd="sudo shutdown -h now" \ sql="pgcli" \ update="sudo apt update && apt upgrade" \ wttr="curl wttr.in/Wroclaw" # Git aliases alias \ dotfiles="/usr/bin/git --git-dir=\$HOME/.dotfiles --work-tree=\$HOME" \ ga="git add" \ gc="git commit" \ gp="git push" \ gr="git rm" \ gs="git status"