-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
268 lines (206 loc) · 7.1 KB
/
.zshrc
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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
export ZSH=$HOME/.oh-my-zsh
ZSH_THEME="osx2"
plugins=(
git
zsh-autosuggestions
zsh-syntax-highlighting
bgnotify
zsh-fzf-history-search
)
PATH="$PREFIX/bin:$HOME/.local/bin:$PATH"
export PATH
LINK="https://github.com/mayTermux"
export LINK
LINK_SSH="[email protected]:mayTermux"
export LINK_SSH
export TERM=xterm-256color
source $ZSH/oh-my-zsh.sh
source $HOME/.autostart
source "$HOME/.secrets"
# sshd
# User configuration
alias sk='node mongo-query'
alias dev='am start -a android.settings.APPLICATION_DEVELOPMENT_SETTINGS'
alias rish='~/.scripts/custom/rish'
### disable underline in zsh-syntax-highlighting
(( ${+ZSH_HIGHLIGHT_STYLES} )) || typeset -A ZSH_HIGHLIGHT_STYLES
ZSH_HIGHLIGHT_STYLES[path]=none
ZSH_HIGHLIGHT_STYLES[path_prefix]=none
### EXPORT
export EDITOR='nvim' # $EDITOR use nvim in terminal
### "bat" as manpager
export MANPAGER='nvim +Man!'
### VARIABLES
PKG_BKUP_PATH="$HOME/.backup/packages.txt"
IP='192.168.29.100'
### ALIASES ###
# Changing "ls" to "exa"
alias ls='eza --color=always --group-directories-first' # my preferred listing
alias la='eza -a --color=always --group-directories-first' # all files and dirs
alias ll='eza -al --color=always --group-directories-first' # long format
alias lt='eza -aT --color=always --group-directories-first' # tree listing
alias l.='eza -a | grep -E "^\."'
# confirm before overwriting something
alias cp='cp -i'
alias mv='mv -i'
alias rm='rm -i'
# bare git repo alias for dotfiles
alias cfg='git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
# pkg and pip update
alias pkgu='pkg up -y'
alias cleanup='pkg clean && apt autoremove'
# pkg packages & apps list
alias backup='printf "# pkg\n" > $PKG_BKUP_PATH && dpkg -l | grep "^ii" | awk "{print \$2}" >> $PKG_BKUP_PATH && printf "done\n"'
alias apps='adb shell pm list packages | sed 's/package://' | sort > ~/.backup/apps.txt'
# refresh zsh
alias refresh='source ~/.zshrc'
# edit conf
alias aliasconf='nvim ~/.zshrc'
alias backupconf='nvim ~/.backup/README.md'
# it db
it() {
grep --color='auto' --ignore-case "$1" ~/IT_DB.txt
}
# go to home
alias home='cd ~/storage/shared/'
### SETTING THE STARSHIP PROMPT ###
eval "$(starship init zsh)"
### OTHERS ###
# fzf
alias preview="fzf --preview='bat --color=always --style=numbers --theme OneHalfDark {}' --preview-window=down"
#Change
alias chcolor="~/.scripts/colorscheme/colors.sh"
alias chfont="~/.scripts/fonts/fonts.sh"
alias chzsh="~/.scripts/zsh/changetheme.sh"
#Config
alias fontused="cat ~/.config/mytermux/fonts/used.log"
alias colorused="cat ~/.config/mytermux/colorscheme/used.log"
alias zshused="cat ~/.config/mytermux/zsh/used.log"
#System
alias q="exit"
# alias c="clear"
alias sd="cd /sdcard"
alias pf="cd $PREFIX"
#Package Manager
alias pacupg="pkg upgrade"
alias pacupd="pkg update"
alias pacupgupd="pkg update && pkg upgrade"
#Convert Video
alias convi="ffmpeg -i $1 -c:v libx264 -crf 25 $2"
#Ping
alias pg="ping google.com"
#MyIP (Local) Pre
alias myip="bash ~/.scripts/system/ip.sh simcard"
alias myipwifi="bash ~/.scripts/system/ip.sh wifi"
alias myiphotspot="~/.scripts/system/ip.sh hotspot"
alias myipvpn="~/.scripts/system/ip.sh vpn"
alias myipall="~/.scripts/system/ip.sh all"
#Music
alias n="ncmpcpp"
alias mkill="mpd --kill"
alias m="music"
alias ncmpcpp-compile="~/myTermux/compile/install/ncmpcpp-compile.sh"
#Color Toys
alias 256colors2="~/.scripts/toys/256colors2.pl"
alias bloks="~/.scripts/toys/bloks"
alias colortest="~/.scripts/toys/colortest"
alias colortest-slim="~/.scripts/toys/colortest-slim"
alias colorview="~/.scripts/toys/colorview"
alias colorbars="~/.scripts/toys/colorbars"
alias panes="~/.scripts/toys/panes"
alias pipes1="~/.scripts/toys/pipes1"
alias pipes2="~/.scripts/toys/pipes2"
alias pipes2-slim="~/.scripts/toys/pipes2-slim"
alias dna="~/.scripts/toys/dna"
alias ghost="~/.scripts/toys/ghost"
alias jfetch="~/.scripts/toys/jfetch"
alias pacman="~/.scripts/toys/pacman"
alias pipesx="~/.scripts/toys/pipesx"
alias rains="~/.scripts/toys/rains"
alias spacey="~/.scripts/toys/spacey"
#archives .deb
alias archives="cd /data/data/com.termux/cache/apt/archives/"
#Photos
alias ss="cd /sdcard/Pictures/Screenshots/"
#Movies
alias ms="cd /sdcard/Movies"
#Downloads
alias dl="cd /sdcard/Download"
#Documents
alias ds="cd /sdcard/Documents"
#Largest Files
alias largefile="du -h -x -s -- * | sort -r -h | head -20"
#System Information
#alias neo="bash ~/.config/neofetch/debug-logo.sh --randomsmall"
alias neo="neofetch"
alias neodebug="bash ~/.config/neofetch/debug-logo.sh $1"
alias disk="bash ~/.scripts/system/fetch.sh storage"
alias battery="bash ~/.scripts/system/fetch.sh battery"
# alias ls="exa --icons"
# alias la="exa --icons -lgha --group-directories-first"
# alias lt="exa --icons --tree"
alias lta="exa --icons --tree -lgha"
alias bat="bat --theme OneHalfDark"
alias cat="bat --theme OneHalfDark -p $@"
#proot-distro
alias prot="cd $PREFIX/var/lib/proot-distro"
alias protlogin="proot-distro login $1"
#Magick
alias listfont="magick convert -list font | grep -iE 'font:.*'"
## Configuration
#mpd
alias mpdconf="nvim ~/.config/mpd/mpd.conf"
alias mpconf="nvim /data/data/com.termux/files/usr/etc/mpd.conf"
#ncmpcpp
alias ncmconf="nvim ~/.config/ncmpcpp/config"
#neovim
alias nviminit="nvim ~/.config/nvim/init.lua"
alias nvimtheme="nvim ~/.config/nvim/lua/chadrc.lua"
alias nvimplug="nvim ~/.config/nvim/lua/pluginList.lua"
alias nvimmap="nvim ~/.config/nvim/lua/mappings.lua"
alias nvimpacnit="nvim ~/.config/nvim/lua/packerInit.lua"
alias nvimsin="nvim ~/.config/nvim/lua/core/xshin.lua"
alias nvimhighlight="nvim ~/.config/nvim/lua/hightlights.lua"
alias nvimcore="nvim ~/.config/nvim/lua/core/init.lua"
#zsh
alias zshconf="nvim ~/.zshrc"
#neofetch
alias neoconf="nvim ~/.config/neofetch/config.conf"
alias rxconf="nvim ~/.local/bin/rxfetch"
alias neoscript="nvim ~/.config/neofetch/script.sh"
alias fetch="bash ~/.scripts/system/fetch.sh $@"
alias fetchconf="nvim ~/.scripts/system/fetch.sh"
alias awesomeconf="nvim ~/.config/awesomeshot/awesomeshot.conf"
#git
alias gitgraph="git log --all --decorate --oneline --graph"
alias gitupdate="git fetch && git pull"
alias gitstat="git status"
alias gitad="git add $@"
alias gitcom="git commit -m '$@'"
#Web Server (Require install LAMP on Termux) https://github.com/xshin404/lampTermux
alias apaconf="nvim $PREFIX/etc/apache2/httpd.conf"
alias phpmyadminconf="nvim $PREFIX/etc/phpmyadmin/config.inc.php"
#Refresh
# alias refresh="source $HOME/.zshrc"
#Unsource
alias unsource="exec $SHELL -l"
#PID Login
alias loginconf="nvim ~/.scripts/login.sh"
alias exit="if [ -f ~/.scripts/pid/login ]; then rm ~/.scripts/pid/login; fi && exit"
#MyIP
alias myipconf="nvim ~/.scripts/ip.sh"
#termux-reload
alias reload="termux-reload-settings"
#termux-setting
alias termconf="nvim ~/.termux/termux.properties"
#termux-permission
alias termper="termux-setup-storage"
# alias aliasconf="nvim ~/.aliases"
alias startconf="nvim ~/.autostart"
alias repocek="node ~/.scripts/js/repochecker.js"
alias schemeconf="nvim ~/.scripts/colorscheme/colors.sh"
alias fontsconf="nvim ~/.scripts/fonts/fonts.sh"
alias zshthemeconf="nvim ~/.scripts/zsh/changetheme.sh"
# Termux:API
alias scan="termux-media-scan"
alias open="termux-open"