Add Plugin-nvim to manage emoji; add emoji for sound, battery, Need to be improve
This commit is contained in:
parent
3c8bca139e
commit
c78f9dab7e
1
init.vim
1
init.vim
|
@ -32,6 +32,7 @@ Plug 'https://github.com/tc50cal/vim-terminal' " Vim Terminal
|
||||||
Plug 'https://github.com/terryma/vim-multiple-cursors' " CTRL + N for multiple cursors
|
Plug 'https://github.com/terryma/vim-multiple-cursors' " CTRL + N for multiple cursors
|
||||||
Plug 'https://github.com/preservim/tagbar' " Tagbar for code navigation
|
Plug 'https://github.com/preservim/tagbar' " Tagbar for code navigation
|
||||||
Plug 'norcalli/nvim-colorizer.lua' "Color Hexadecimal
|
Plug 'norcalli/nvim-colorizer.lua' "Color Hexadecimal
|
||||||
|
Plug 'https://github.com/chrisbra/unicode.vim' "For utf-8 emoji
|
||||||
|
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
|
|
30
status.sh
30
status.sh
|
@ -10,5 +10,33 @@ date_formatted=$(date "+%a %d-%m-%+4Y %H:%M")
|
||||||
battery_status=$(cat /sys/class/power_supply/BAT1/status)
|
battery_status=$(cat /sys/class/power_supply/BAT1/status)
|
||||||
battery_level=$(cat /sys/class/power_supply/BAT1/capacity)
|
battery_level=$(cat /sys/class/power_supply/BAT1/capacity)
|
||||||
|
|
||||||
echo "$battery_level%" $battery_status '|' $date_formatted
|
battery_symbol=🔋
|
||||||
|
if [ "$battery_level" -ge 20 ]; then
|
||||||
|
battery_symbol=🔋
|
||||||
|
elif [ "$battery_level" -lt 20 ]; then
|
||||||
|
battery_symbol=🪫
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Get volume left side Master
|
||||||
|
volume_left_side=$(amixer sget Master | grep "Front Left:" | awk '{print $5}' | sed 's/[][]//g' | sed 's/%//g')
|
||||||
|
|
||||||
|
# Muted
|
||||||
|
muted=$(amixer sget Master | grep "Front Left:" | awk '{print $6}' | sed 's/[][]//g')
|
||||||
|
|
||||||
|
volume_symbol=🔈
|
||||||
|
# Check Muted
|
||||||
|
if [ "$muted" = "off" ]; then
|
||||||
|
volume_symbol=🔇
|
||||||
|
else
|
||||||
|
# Volume symbol compared to volume level
|
||||||
|
if [ "$volume_left_side" -ge 60 ]; then
|
||||||
|
volume_symbol=🔊
|
||||||
|
elif [ "$volume_left_side" -ge 20 ]; then
|
||||||
|
volume_symbol=🔉
|
||||||
|
elif [ "$volume_left_side" -ge 0 ]; then
|
||||||
|
volume_symbol=🔈
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Final Echo
|
||||||
|
echo "$volume_left_side%" $volume_symbol '|' "$battery_level%" $battery_symbol $battery_status '|' $date_formatted
|
||||||
|
|
Loading…
Reference in a new issue