-
-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Labels
Description
I want to contribute with a beautiful way to show the battery status (you need to have a nerd font) with icons.
function! Battery_icon()
let l:battery_icon = {
\ 5: " ",
\ 4: " ",
\ 3: " ",
\ 2: " ",
\ 1: " "}
let l:backend = battery#backend()
let l:nf = float2nr(round(backend.value / 20.0))
return printf('%s', get(battery_icon, nf))
endfunction
let g:airline_section_x = airline#section#create(['%{battery#sign()} %{battery#value()}%% %{Battery_icon()}'])
Reactions are currently unavailable

