Skip to content

Commit 3ecf749

Browse files
authored
Update battery_percentage.sh
Add pull request tmux-plugins#89 - Fix battery percentage output when using upower ( tmux-plugins#89 )
1 parent 8d58825 commit 3ecf749

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/battery_percentage.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ print_battery_percentage() {
2222
fi
2323
local percentage=$(upower -i $battery | awk '/percentage:/ {print $2}')
2424
if [ "$percentage" ]; then
25-
echo ${percentage%.*%}
25+
echo "$(float2int $percentage)%"
2626
return
2727
fi
2828
local energy

0 commit comments

Comments
 (0)