-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaliases
executable file
·193 lines (160 loc) · 9.11 KB
/
aliases
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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
# github.com/tagirov/cfg
#--------------------------------------------------------------
alias zshe='kak ~/.aliases'
alias zshs='source ~/.zshrc'
alias sudo='sudo ' # Is a hack that allows to your
# aliases to work in sudo mode
#--------------------------- sys ------------------------------
alias \
mv='mv -iv' \
cp='cp -iv' \
ln='ln -iv' \
\
chown='chown --preserve-root' \
chmod='chmod --preserve-root' \
chgrp='chgrp --preserve-root' \
\
rm='rm --preserve-root' \
rd='rm -rf' \
\
t='touch' \
h='htop' \
l='lsblk' \
\
md='mkdir -p' \
ka='killall' \
hy='fc -lDi' \
df='df -h' \
du='du -hs * | sort -h' \
now='date +"%n [ %R ] %A %D%n"' \
diff='diff --color=always' \
class='xprop | rg CLASS' \
mount='mount | column -t'
#--------------------------- cfg ------------------------------
alias \
cfg='cd ~/.config/' \
\
kk='kak ~/.config/kak/kakrc' \
ladi='kak ~/.config/kak/colors/ladies-night.kak' \
swayconf='kak ~/.config/sway/config'
#--------------------------- git ------------------------------
alias \
gc='git clone' \
gi='git init' \
ga='git add' \
gp='git push' \
gf='git fetch' \
gs='git status' \
gl='git log' \
gaa='git add --all' \
gpl='git pull' \
gpu='git push -u origin main'
gra() {
git remote add origin \
https://github.com/tagirov/"$1".git
}
gcj() {
git clone "$1"
cd ${1##*/}
}
gcm() {
git commit -m "$1"
}
gac() {
git add --all
git commit -m "$*"
}
#-------------------------- dirs ------------------------------
alias \
c='cd ~/code/' \
g='cd ~/code/repo/' \
dn='cd ~/code/deno/' \
pg='cd ~/code/play/' \
dl='cd ~/down/' \
yew='cd ~/code/yew/src/' \
bins='cd ~/bins/' \
bots='cd ~/code/bots/' \
deps='kak ~/misc/deps/' \
screen='cd ~/pics/screen/' \
voyager='/run/media/alex/voyager/' \
\
/='cd /' \
~='cd ~' \
.='cd ../' \
..='cd ../../' \
.3='cd ../../../' \
.4='cd ../../../../' \
.5='cd ../../../../../' \
\
e='ls -lhG --group-directories-first \
--time-style=long-iso' \
ea='e -aA' \
ee='e -d .*' \
\
ls='ls --color=always'
#-------------------------- memos -----------------------------
alias \
memoreg='bat ~/misc/memo/regexp' \
memofff='bat ~/misc/memo/fff' \
memobackup='bat ~/misc/memo/backup' \
memochrome='bat ~/misc/memo/chromekeys'
#-------------------------- pacman ----------------------------
alias \
pacman='pacman --color=always' \
\
u='doas pacman -Syu' \
p='doas pacman -S' \
a='paru -S' \
pas='pacman -Ss' \
aus='paru -Ss' \
del='doas pacman -Rs' \
delc='doas pacman -Rsn' \
lostp='pacman -Qqdt' \
listp="comm -23 <(pacman -Qqe | sort) <({ pacman -Qqg \
base-devel; expac -l '\n' '%E' base; } | sort -u )" \
clean='doas pacman -Sc' \
deepclean='doas pacman -Scc'
#-------------------------- misc ------------------------------
alias \
v='kak' \
z='zathura' \
b='bat' \
x='emacs &' \
f='fff' \
ca='cargo' \
br='broot' \
dr='deno run' \
2b='xclip -sel c' \
nw='newsboat' \
mc='mc -b' \
hf='hfetch' \
nwe='kak ~/.newsboat/urls' \
wget='wget -c' \
drop='dragon-drag-and-drop' \
fping='ping -c 100 -s .2' \
index='kak ~/misc/startpage.html' \
ports='netstat -tulanp' \
speed='speedtest-cli' \
wgetsite='wget -rkx "$1"' \
cmatrix='cmatrix -b -u 12 -C cyan' \
udiskie='udiskie -qN'
#--------------------------- fn -------------------------------
color() {
grim -g "$(slurp -p)" -t ppm - | convert - -format \
'%[pixel:p{0,0}]' txt:-
}
mdj() {
mkdir $1 && cd $1
}
#------------------------- youtube ----------------------------
alias \
ym="youtube-dl --ignore-errors -f bestaudio \
--extract-audio --audio-format mp3 \
--audio-quality 0 -o './%(title)s.%(ext)s'" \
yv="youtube-dl --ignore-errors -o \
'./%(title)s.%(ext)s'"
#--------------------------------------------------------------
alias ws='wasm-pack build --target web --out-name wasm \
--out-dir ./static && miniserve ./static --index index.html'
alias wb='wasm-pack build --target web --out-name wasm \
--out-dir ./static'