THEAARBS alias rc

Raw

#!/bin/bash
#        _ _
#   __ _| (_) __ _ ___ _ __ ___
#  / _` | | |/ _` / __| '__/ __|
# | (_| | | | (_| \__ \ | | (__
#  \__,_|_|_|\__,_|___/_|  \___|
#
# ~/.config/aliasrc

se() {
	choice="$(find ~/.local/bin -mindepth 1 -printf '%P\n' | fzf)"
	[ -f "$HOME/.local/bin/$choice" ] && $EDITOR "$HOME/.local/bin/$choice"
	}

# Verbosity and settings that I want most of the time

alias \
	cp="cp -iv" \
	mv="mv -iv" \
	rm="rm -vI" \
	bc="bc -ql" \
	mkd="mkdir -pv" \
	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"

# Shortened commands for convenience

alias \
	ka="killall" \
	sdn="sudo shutdown now" \
	reboot="sudo reboot now" \
	newnet="sudo systemctl restart NetworkManager" \
	psref="gpg-connect-agent RELOADAGENT /bye" \
	atltime="sudo timedatectl set-timezone America/New_York" \
	tuctime="sudo timedatectl set-timezone America/Phoenix" \
	mi="clear && sudo make clean install" \
	upgr="neofetch && sudo apt update && sudo apt upgrade -y && unix && echo Update complete. | figlet" \
	nf="neofetch" \
	journalctl="sudo journalctl" \
	systemctl="sudo systemctl"

# Program aliases
alias calcurse="calcurse -D ~/.config/calcurse" \
	calendar="calcurse -D ~/.config/calcurse" \
	aud="pulsemixer" \
	tmux="tmux -f ~/.config/tmuxrc" \
	tm="tmux -f ~/.config/tmuxrc" \
	v="vim" \
	sv="sudo vim" \
	lf="lfub" \
	files="lfub" \
	pushkey="ssh-copy-id -i ~/.ssh/id_rsa.pub" \
	g="git" \
	email="neomutt" \
	www="w3m" \
	mus="ncmpcpp" \
	news="newsboat" \
	yt="newsboat -u ~/.config/newsboat/youtube -c ~/.local/share/newsboat/youtube.db" \
	youtube="newsboat -u ~/.config/newsboat/youtube -c ~/.local/share/newsboat/youtube.db" \
	reddit="rtv" \
	disks="gnome-disks" \
	bcdl="bandcamp-dl" \
	ytdl="youtube-dl" \
	tt="tuxtype" \
	math="tuxmath" \
	note="vim ~/Documents/Note.md" \
	chat="mkdir -p ~/Logs/irc ; sic -h chat.freenode.com | tee ~/Logs/irc/$(date +%m%d)$(date +%H%M)chat.log" \
	cchat="mkdir -p ~/Logs/irc ; sic -h chat.freenode.com | tee ~/Logs/irc/$(date +%m%d)$(date +%H%M)chat.log | lolcat" \
	mapscii="telnet mapscii.me" \
	speedtest="speedtest | lolcat"

# Navigation shortcuts
alias d="cd ~/Documents && ls -a" \
	P="cd ~/Projects && ls -a" \
	D="cd ~/Downloads && ls -a" \
	m="cd ~/Music && ls -a" \
	pp="cd ~/Pictures && ls -a" \
	vv="cd ~/Videos && ls -a" \
	s="cd ~/.local/bin && ls -a" \
	n="cd ~/Documents/networks && ls -a" \
	cf="cd ~/.config && ls -a" \
	mkd="mkdir -pv" \
	rf="source ~/.bashrc"

# Scripts
alias push="syncworkflow up" \
	pull="syncworkflow down" \
	ci="checkin" \
	co="checkin checkout" \
	checkout="checkin checkout" \
	pwgen="genpw" \
	fs="findstring" \
	rs="replacespaces" \
	te="timeentry" \
	repo="~/Projects/syncrepo.sh"

vf() { $EDITOR $(fzf) ; }

alias ref="shortcuts >/dev/null; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutenvrc"