tmux-plugins / tmux-battery

Plug and play battery percentage and icon indicator for Tmux.
MIT License
503 stars 98 forks source link

Fix battery percentage output when using upower #89

Open norbertszivos opened 4 years ago

norbertszivos commented 4 years ago

Upower output was 98,4789% which mess up the icon and graph view as well. Basically for me the float number used , instead of . and the ${percentage%.*%} did not do what it should do. Another thing that the original string manipulation cut the % as well:

float=12.8% && echo ${float%.*%}
12