Skip to content

Commit fddd968

Browse files
committed
myTermux-v.0.4.0 pre
1 parent 41a59d2 commit fddd968

File tree

5 files changed

+128
-19
lines changed

5 files changed

+128
-19
lines changed

.config/neofetch/script.sh

Lines changed: 118 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,25 +30,131 @@ battery() {
3030

3131
if [[ -f $PREFIX/bin/termux-battery-status ]]; then
3232

33-
percentage=`termux-battery-status | grep percentage | awk '{print $2}' | tr , '%'`
33+
34+
perc=`termux-battery-status | grep percentage | awk '{print $2}' | tr , '%'`
35+
#debug perc
36+
#perc=9
3437
status=`termux-battery-status | grep status | awk '{print $2}'`
35-
lyw='\e[93m'
36-
lgn='\e[92m'
37-
df='\e[39m'
38+
lrd="\e[91m"
39+
lyw="\e[93m"
40+
lgn="\e[92m"
41+
df="\e[39m"
3842

39-
if [[ $status == '"CHARGING",' ]]; then
43+
old() {
4044

41-
echo -e $lgn"$df : Charging, (${percentage})"
45+
if [[ $status == '"CHARGING",' ]]; then
4246

43-
elif [[ $status == '"DISCHARGING",' ]]; then
47+
echo -e $lgn"$df : Charging, (${perc})"
4448

45-
echo -e $lyw"$df : Discharging, (${percentage})"
49+
elif [[ $status == '"DISCHARGING",' ]]; then
4650

47-
elif [[ $status == '"FULL"' ]]; then
51+
echo -e $lyw"$df : Discharging, (${perc})"
4852

49-
echo -e $lgn"$df : Full, (${percentage})"
53+
elif [[ $status == '"FULL"' ]]; then
5054

51-
fi
55+
echo -e $lgn"$df : Full, (${perc})"
56+
57+
fi
58+
59+
}
60+
61+
62+
new() {
63+
64+
#Known bug :
65+
# - Icon : 100% Battery on Discharging
66+
# 3-9% Battery on Discharging
67+
68+
#Discharging
69+
70+
if [[ $perc < 21 && $status == '"DISCHARGING",' ]]; then
71+
72+
echo -e $lrd"$df : Discharging, (${perc})"
73+
74+
elif [[ $perc < 30, && $perc > 20 && $status == '"DISCHARGING",' ]]; then
75+
76+
echo -e $lyw"$df : Discharging, (${perc})"
77+
78+
elif [[ $perc < 40 && $perc > 29 && $status == '"DISCHARGING",' ]]; then
79+
80+
echo -e $lyw"$df : Discharging, (${perc})"
81+
82+
elif [[ $perc < 50 && $perc > 39 && $status == '"DISCHARGING",' ]]; then
83+
84+
echo -e $lyw"$df : Discharging, (${perc})"
85+
86+
elif [[ $perc < 60 && $perc > 49 && $status == '"DISCHARGING",' ]]; then
87+
88+
echo -e $lyw"$df : Discharging, (${perc})"
89+
90+
elif [[ $perc < 70 && $perc > 59 && $status == '"DISCHARGING",' ]]; then
91+
92+
echo -e $lyw"$df : Discharging, (${perc})"
93+
94+
elif [[ $perc < 80 && $perc > 69 && $status == '"DISCHARGING",' ]]; then
95+
96+
echo -e $lyw"$df : Discharging, (${perc})"
97+
98+
elif [[ $perc < 90 && $perc > 79 && $status == '"DISCHARGING",' ]]; then
99+
100+
echo -e $lyw"$df : Discharging, (${perc})"
101+
102+
elif [[ $perc < 99, && $perc > 89 && $status == '"DISCHARGING",' ]]; then
103+
104+
echo -e $lyw"$df : Discharging, (${perc})"
105+
106+
elif [[ $perc == 100 && $status == '"DISCHARGING",' ]]; then
107+
108+
echo -e $lgn"$df : Discharging, (${perc})"
109+
110+
111+
#Charging
112+
113+
elif [[ $perc < 21 && $perc > 2 && $status == '"CHARGING",' ]]; then
114+
115+
echo -e $lgn"$df : Charging, (${perc})"
116+
117+
elif [[ $perc < 30 && $perc > 20 && $status == '"CHARGING",' ]]; then
118+
119+
echo -e $lgn"$df : Charging, (${perc})"
120+
121+
elif [[ $perc < 40 && $perc > 29 && $status == '"CHARGING",' ]]; then
122+
123+
echo -e $lgn"$df : Charging, (${perc})"
124+
125+
elif [[ $perc < 50 && $perc > 39 && $status == '"CHARGING",' ]]; then
126+
127+
echo -e $lgn"$df : Charging, (${perc})"
128+
129+
elif [[ $perc < 60 && $perc > 49 && $status == '"CHARGING",' ]]; then
130+
131+
echo -e $lgn"$df : Charging, (${perc})"
132+
133+
elif [[ $perc < 70 && $perc > 59 && $status == '"CHARGING",' ]]; then
134+
135+
echo -e $lgn"$df : Charging, (${perc})"
136+
137+
elif [[ $perc < 80 && $perc > 69 && $status == '"CHARGING",' ]]; then
138+
139+
echo -e $lgn"$df : Charging, (${perc})"
140+
141+
elif [[ $perc < 90 && $perc > 79 && $status == '"CHARGING",' ]]; then
142+
143+
echo -e $lgn"$df : Charging, (${perc})"
144+
145+
elif [[ $perc < 99,5 && $perc > 89 && $status == '"CHARGING",' ]]; then
146+
147+
echo -e $lgn"$df : Charging, (${perc})"
148+
149+
elif [[ $perc == 100 && $status == '"CHARGING",' ]]; then
150+
151+
echo -e $lgn"$df : Charging, (${perc})"
152+
153+
fi
154+
155+
}
156+
157+
new
52158

53159
else
54160

@@ -60,7 +166,7 @@ battery() {
60166

61167
version() {
62168

63-
echo -e "neofetch output v.0.3.0"
169+
echo -e "neofetch output v.0.3.0 pre"
64170

65171
}
66172

.config/nvim/settings/keybinds.vim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ nmap <M-c> <esc>:set termguicolors<cr>
6565
vmap <M-c> <esc>:set termguicolors<cr>
6666
imap <M-c> <esc>:set termguicolors<cr>
6767
68-
" Ctrl+Alt+c Disable termguicolors
69-
nmap <C-M-c> <esc>:set notermguicolors<cr>
70-
vmap <C-M-c> <esc>:set notermguicolors<cr>
71-
imap <C-M-c> <esc>:set notermguicolors<cr>
68+
" Ctrl+Alt+g Disable termguicolors
69+
nmap <C-M-g> <esc>:set notermguicolors<cr>
70+
vmap <C-M-g> <esc>:set notermguicolors<cr>
71+
imap <C-M-g> <esc>:set notermguicolors<cr>
7272

.config/nvim/settings/plugins.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ call plug#begin('~/.config/nvim/plugs')
1717
Plug 'jiangmiao/auto-pairs'
1818

1919
" Statusline theme
20-
Plug 'vim-airline/vim-airline'
20+
"Plug 'vim-airline/vim-airline'
2121
"Plug 'itchyny/lightline.vim'
2222

2323
" Better syntax highlighting

.config/nvim/settings/sets.vim

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,6 @@ let NERDTreeShowHidden=1
4646
" disable autocomment
4747
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
4848

49-
" search highlight dissapeared
49+
" unset termguicolors / true color
50+
51+
set notermguicolors

.zshrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ source $ZSH/oh-my-zsh.sh
135135
alias pipes2-slim="~/.color-toys/pipes2-slim"
136136

137137
#System Information
138-
alias neo="neofetch --ascii_distro android_small && colortest-slim"
138+
alias neo="neofetch --ascii_distro android_small && panes"
139139
alias memory="bash ~/.config/neofetch/script.sh --storage"
140140
alias battery="bash ~/.config/neofetch/script.sh --battery"
141141
alias ls="exa --icons"
@@ -157,6 +157,7 @@ source $ZSH/oh-my-zsh.sh
157157
alias nvimconf="nvim ~/.config/nvim/settings/sets.vim"
158158
alias nvimtheme="nvim ~/.config/nvim/settings/themes.vim"
159159
alias nvimkey="nvim ~/.config/nvim/settings/keybinds.vim"
160+
alias nvimset="nvim ~/.config/nvim/settings/sets.vim"
160161

161162
#zsh
162163
alias zshconf="nvim ~/.zshrc"

0 commit comments

Comments
 (0)