blob: 8c7fd00e30ca7138a22ca3d4f4ccd8075a0bf92d (
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
|
# alias.zsh
# ========================
# ===== ===============
# ====== ================
# ====== ================
# ====== ==== ==== ==
# ====== === == = =
# ====== === = == =
# = === === = == ====
# = === === = == = =
# == ===== ==== ==
# ========================
alias exa='exa --color=always --group-directories-first' \
ls='exa -l'
tree() {
exa -T $@ | less
}
alias c='clear' \
less='less --tabs 4' \
bc='bc -l' \
mkf='gmake fclean' \
mkc='gmake clean' \
mk='gmake -j5' \
bmkc='make clean' \
bmk='make -j5' \
web='w3m https://duckduckgo.com/' \
mpv='mpv --audio-channels=stereo' \
cp='cp -iv' \
mv='mv -iv' \
rm='rm -v' \
ln='ln -v' \
df='df -h' \
du='du -h' \
mkdir='mkdir -v' \
rmdir='rmdir -v' \
chmod='chmod -v' \
chown='chown -v' \
mount='mount -v' \
rsync='rsync -v -h -P' \
grep='grep --color=always' \
rgrep='grep -R -n -H' \
vifm='TERM=xterm-256color vifm' \
fetch='torify fetch' \
fsl='fossil' \
diff='colordiff' \
ctags='uctags "--exclude=.ccls*"' \
yt='straw-viewer --api=auto -C -f' \
yta='straw-viewer --api=auto -C -n' \
gyt='gtk-straw-viewer' \
ytdl='youtube-dl --add-metadata' \
ytdlist='youtube-dl -F' \
ytdl1080="youtube-dl --add-metadata -f '[height<=1080]'" \
dgit='git --git-dir=$HOME/docs/dotfiles-bsd --work-tree=$HOME'
confgit() {
p=$(pwd)
cd /
git --git-dir=$HOME/docs/conffiles-bsd --work-tree=/ $@
cd $p
}
alias vim='nvim' \
gst='git status' \
ga='git add' \
gco='git commit -m' \
gpp='git push' \
gpo='git push origin' \
srcnt='find . -type f -name "*.c" -exec cat {} \; | sed "/^\//d" | sed "/^\*/d" | sed "/^ \*/d" | sed "/^\/\//d" | sed "/^$/d" | wc -l | tr -d " "' \
startdocker='sudo service vboxnet onerestart && docker-machine start docker-home' \
stopdocker='docker-machine stop docker-home' \
envdocker='eval $(docker-machine env docker-home)' \
vimz='nvim $(fzf --preview="head -$FZF_PREVIEW_LINES {}")' \
v='nvim $(fzf --preview="head -$FZF_PREVIEW_LINES {}")' \
tohex='printf "0x%x\n"'
vimbin() {
p=$(pwd)
cd "$HOME"/.local/bin || return
sc=$(fzf --preview='head -$FZF_PREVIEW_LINES {}')
if [ ! "$sc" ]; then
cd $p
return
fi
nvim $sc
cd $p
}
vimconf() {
p=$(pwd)
cd "$HOME"/.config || return
sc=$(fzf --preview='head -$FZF_PREVIEW_LINES {}')
if [ ! "$sc" ]; then
cd $p
return
fi
nvim $sc
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='torify newsboat' \
mutt='neomutt' \
sxiv='sxiv -b -a' \
pinfo='pkg info -x' \
psearch='pkg search' \
highlight='highlight -Oxterm256 -t4' \
hi='highlight'
hil() {
highlight -Oxterm256 -t4 "$1" | less
}
search() {
make -C /usr/ports search name=$1 | grep 'Path:';
}
alias watch='cmdwatch' \
tsd='transmission-daemon' \
tsm='transmission-remote' \
rsox='sox -t oss default' \
calcurse='calcurse -C $XDG_CONFIG_HOME/calcurse -D $XDG_DATA_HOME/calcurse' \
open='xdg-open' \
abook='abook -C $XDG_CONFIG_HOME/abook/abookrc --datafile $XDG_DATA_HOME/abook/addressbook' \
dosbox='dosbox -conf $XDG_CONFIG_HOME/dosbox/dosbox.conf' \
svn='svn --config-dir $XDG_CONFIG_HOME/subversion' \
gpg2='gpg2 --homedir $XDG_DATA_HOME/gnupg' \
yarn='yarn --use-yarnrc $XDG_CONFIG_HOME/yarn/config' \
wget='wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"'
|