Skip to content

Commit

Permalink
myTermux-v.0.4.0 pre
Browse files Browse the repository at this point in the history
  • Loading branch information
nihsx committed Mar 19, 2021
1 parent 41a59d2 commit fddd968
Show file tree
Hide file tree
Showing 5 changed files with 128 additions and 19 deletions.
130 changes: 118 additions & 12 deletions .config/neofetch/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,131 @@ battery() {

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

percentage=`termux-battery-status | grep percentage | awk '{print $2}' | tr , '%'`

perc=`termux-battery-status | grep percentage | awk '{print $2}' | tr , '%'`
#debug perc
#perc=9
status=`termux-battery-status | grep status | awk '{print $2}'`
lyw='\e[93m'
lgn='\e[92m'
df='\e[39m'
lrd="\e[91m"
lyw="\e[93m"
lgn="\e[92m"
df="\e[39m"

if [[ $status == '"CHARGING",' ]]; then
old() {

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

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

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

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

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

fi
echo -e $lgn"$df : Full, (${perc})"

fi

}


new() {

#Known bug :
# - Icon : 100% Battery on Discharging
# 3-9% Battery on Discharging

#Discharging

if [[ $perc < 21 && $status == '"DISCHARGING",' ]]; then

echo -e $lrd"$df : Discharging, (${perc})"

elif [[ $perc < 30, && $perc > 20 && $status == '"DISCHARGING",' ]]; then

echo -e $lyw"$df : Discharging, (${perc})"

elif [[ $perc < 40 && $perc > 29 && $status == '"DISCHARGING",' ]]; then

echo -e $lyw"$df : Discharging, (${perc})"

elif [[ $perc < 50 && $perc > 39 && $status == '"DISCHARGING",' ]]; then

echo -e $lyw"$df : Discharging, (${perc})"

elif [[ $perc < 60 && $perc > 49 && $status == '"DISCHARGING",' ]]; then

echo -e $lyw"$df : Discharging, (${perc})"

elif [[ $perc < 70 && $perc > 59 && $status == '"DISCHARGING",' ]]; then

echo -e $lyw"$df : Discharging, (${perc})"

elif [[ $perc < 80 && $perc > 69 && $status == '"DISCHARGING",' ]]; then

echo -e $lyw"$df : Discharging, (${perc})"

elif [[ $perc < 90 && $perc > 79 && $status == '"DISCHARGING",' ]]; then

echo -e $lyw"$df : Discharging, (${perc})"

elif [[ $perc < 99, && $perc > 89 && $status == '"DISCHARGING",' ]]; then

echo -e $lyw"$df : Discharging, (${perc})"

elif [[ $perc == 100 && $status == '"DISCHARGING",' ]]; then

echo -e $lgn"$df : Discharging, (${perc})"


#Charging

elif [[ $perc < 21 && $perc > 2 && $status == '"CHARGING",' ]]; then

echo -e $lgn"$df : Charging, (${perc})"

elif [[ $perc < 30 && $perc > 20 && $status == '"CHARGING",' ]]; then

echo -e $lgn"$df : Charging, (${perc})"

elif [[ $perc < 40 && $perc > 29 && $status == '"CHARGING",' ]]; then

echo -e $lgn"$df : Charging, (${perc})"

elif [[ $perc < 50 && $perc > 39 && $status == '"CHARGING",' ]]; then

echo -e $lgn"$df : Charging, (${perc})"

elif [[ $perc < 60 && $perc > 49 && $status == '"CHARGING",' ]]; then

echo -e $lgn"$df : Charging, (${perc})"

elif [[ $perc < 70 && $perc > 59 && $status == '"CHARGING",' ]]; then

echo -e $lgn"$df : Charging, (${perc})"

elif [[ $perc < 80 && $perc > 69 && $status == '"CHARGING",' ]]; then

echo -e $lgn"$df : Charging, (${perc})"

elif [[ $perc < 90 && $perc > 79 && $status == '"CHARGING",' ]]; then

echo -e $lgn"$df : Charging, (${perc})"

elif [[ $perc < 99,5 && $perc > 89 && $status == '"CHARGING",' ]]; then

echo -e $lgn"$df : Charging, (${perc})"

elif [[ $perc == 100 && $status == '"CHARGING",' ]]; then

echo -e $lgn"$df : Charging, (${perc})"

fi

}

new

else

Expand All @@ -60,7 +166,7 @@ battery() {

version() {

echo -e "neofetch output v.0.3.0"
echo -e "neofetch output v.0.3.0 pre"

}

Expand Down
8 changes: 4 additions & 4 deletions .config/nvim/settings/keybinds.vim
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ nmap <M-c> <esc>:set termguicolors<cr>
vmap <M-c> <esc>:set termguicolors<cr>
imap <M-c> <esc>:set termguicolors<cr>
" Ctrl+Alt+c Disable termguicolors
nmap <C-M-c> <esc>:set notermguicolors<cr>
vmap <C-M-c> <esc>:set notermguicolors<cr>
imap <C-M-c> <esc>:set notermguicolors<cr>
" Ctrl+Alt+g Disable termguicolors
nmap <C-M-g> <esc>:set notermguicolors<cr>
vmap <C-M-g> <esc>:set notermguicolors<cr>
imap <C-M-g> <esc>:set notermguicolors<cr>
2 changes: 1 addition & 1 deletion .config/nvim/settings/plugins.vim
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ call plug#begin('~/.config/nvim/plugs')
Plug 'jiangmiao/auto-pairs'

" Statusline theme
Plug 'vim-airline/vim-airline'
"Plug 'vim-airline/vim-airline'
"Plug 'itchyny/lightline.vim'

" Better syntax highlighting
Expand Down
4 changes: 3 additions & 1 deletion .config/nvim/settings/sets.vim
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,6 @@ let NERDTreeShowHidden=1
" disable autocomment
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o

" search highlight dissapeared
" unset termguicolors / true color

set notermguicolors
3 changes: 2 additions & 1 deletion .zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ source $ZSH/oh-my-zsh.sh
alias pipes2-slim="~/.color-toys/pipes2-slim"

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

#zsh
alias zshconf="nvim ~/.zshrc"
Expand Down

0 comments on commit fddd968

Please sign in to comment.