summaryrefslogtreecommitdiffstats
path: root/.config/zsh/alias.zsh
blob: b3374a6e07255a3d552bce80dc31dd147a0d0821 (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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# alias.zsh
# ========================
# =====    ===============
# ======  ================
# ======  ================
# ======  ====   ====   ==
# ======  ===     ==  =  =
# ======  ===  =  ==     =
# =  ===  ===  =  ==  ====
# =  ===  ===  =  ==  =  =
# ==     =====   ====   ==
# ========================

alias ls='exa -l'
alias c='clear'
alias less='less --tabs 4'
alias bc='clear; bc -l'
alias mkf='gmake fclean'
alias mkc='gmake clean'
alias mk='gmake -j5'
alias web='w3m https://duckduckgo.com/'
alias mpv='mpv --audio-channels=stereo'
alias cp='cp -iv'
alias mv='mv -iv'
alias rm='rm -v'
alias ln='ln -v'
alias df='df -h'
alias du='du -A -h'
alias mkdir='mkdir -v'
alias rmdir='rmdir -v'
alias chmod='chmod -v'
alias chown='chown -v'
alias mount='mount -v'
alias grep='grep --color'
alias rgrep='grep -R -n -H'
alias fsl='fossil'
alias diff='colordiff'
alias tree='tree -C'
alias yt='straw-viewer --api=auto'
alias gyt='gtk-straw-viewer'
alias dgit='git --git-dir=$HOME/docs/dotfiles-bsd --work-tree=$HOME'
alias vim='nvim'
alias gst='git status'
alias ga='git add'
alias gco='git commit -m'
alias gpp='git push'
alias gpo='git push origin'
alias startdocker='sudo service vboxnet restart && docker-machine start docker-home'
alias stopdocker='docker-machine stop docker-home'
alias envdocker='eval `docker-machine env docker-home`'
alias vimz='nvim $(fzf --preview="head -$FZF_PREVIEW_LINES {}")'
alias v='nvim $(fzf --preview="head -$FZF_PREVIEW_LINES {}")'
vbi() {
	p=$(pwd)
	cd "$HOME"/.local/bin || return
	nvim $(fzf --preview='head -$FZF_PREVIEW_LINES {}')
	cd $p
}
pa() {
	if [ "$1" ]; then
		if cd "$HOME"/.local/packs/"$1"; then
			ls
		else
			cd "$HOME"/.local/packs && ls
		fi
	else
		cd "$HOME"/.local/packs && ls
	fi
}
co() {
	if [ "$1" ]; then
		if cd "$XDG_CONFIG_HOME"/"$1"; then
			ls
		else
			cd "$XDG_CONFIG_HOME" && ls
		fi
	else
		cd "$XDG_CONFIG_HOME" && ls
	fi
}
da() {
	if [ "$1" ]; then
		if cd "$XDG_DATA_HOME"/"$1"; then
			ls
		else
			cd "$XDG_DATA_HOME" && ls
		fi
	else
		cd "$XDG_DATA_HOME" && ls
	fi
}
alias bi='cd $HOME/.local/bin && ls'
twi() {
	mpview https://twitch.tv/"$1";
}
alias nb='newsboat'
alias mutt='neomutt'
alias nmt='neomutt'
alias sxiv='sxiv -b'
alias pinfo='pkg info -x'
alias psearch='pkg search'
search() {
	make -C /usr/ports search name=$1 | grep 'Path:';
}
alias watch='cmdwatch'
alias tsd='transmission-daemon'
alias tsm='transmission-remote'
alias rsox='sox -t oss default'
alias calcurse='calcurse -C $XDG_CONFIG_HOME/calcurse -D $XDG_DATA_HOME/calcurse'
alias abook='abook -C $XDG_CONFIG_HOME/abook/abookrc --datafile $XDG_DATA_HOME/abook/addressbook'
alias dosbox='dosbox -conf $XDG_CONFIG_HOME/dosbox/dosbox.conf'
alias svn='svn --config-dir $XDG_CONFIG_HOME/subversion'
alias gpg2='gpg2 --homedir $XDG_DATA_HOME/gnupg'
alias yarn='yarn --use-yarnrc $XDG_CONFIG_HOME/yarn/config'
alias wget='wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"'
alias rsync='rsync -v -h'