summaryrefslogtreecommitdiff
path: root/zscripts/aliasrc.zsh
blob: 5f1b52b5ec99bd767a79270441a68f83b09330b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/usr/bin/env zsh

# Replacement programs
typeset -A repaliases=(
	#alias    replacement
	htop      htim
	mutt      neomutt
	vim       nvim
	sudo      "${SUDO:- }"
	neofetch  fastfetch
)
for alias rep in ${(kv)repaliases}; do
	command -v $rep >/dev/null && alias $alias=$rep
done # Tests if replacement exists before creating alias


# Shorten program names
alias \
	open="xdg-open" \
	smci="sudo make clean install" \
	smi="sudo make install" \
	su="sudo su -l" \
	serve="python3 -m http.server" \

# Power scripts
alias \
	halt="launch shutdown" \
	off="launch shutdown" \
	reboot="launch reboot" \
	zzz="launch suspend" \

# Colorize command output
alias \
	bat="bat --theme='Monokai Extended'" \
	diff="diff --color=auto" \
	exa="exa --icons -a --group-directories-first" \
	grep="grep --color=auto -I --ignore-case --line-number" \
	ip="ip --color=auto" \
	ls="ls -vAhN --color=auto --group-directories-first" \

# (Non)-Verbosity
alias \
	cp="cp -iv" \
	dd="sudo dd status=progress bs=4M"
	ffmpeg="ffmpeg -hide_banner" \
	ffprobe="ffprobe -hide_banner" \
	mkd="mkdir -p" \
	mv="mv -iv" \
	rm="rm -v" \

# Miscellaneous
alias \
	yt-dlp-album="yt-dlp -x -o '%(uploader)s (%(upload_date>%Y)s) - %(playlist_title)s%%%(playlist_index)s - %(title)s.%(ext)s'" \
	yt-dlp="yt-dlp -o '%(uploader)s - %(title)s.%(ext)s'" \

# Clean home directory
alias \
	mbsync="mbsync --config $MBSYNCRC" \
	startx="startx $X11CONFIG/xinitrc" \

# Copy-pasting from internet
alias \
	\$="" \
	\#="${SUDO-sudo}" \