diff --git a/scripts/battery_percentage.sh b/scripts/battery_percentage.sh index d5dce55..ae9cc45 100755 --- a/scripts/battery_percentage.sh +++ b/scripts/battery_percentage.sh @@ -22,7 +22,7 @@ print_battery_percentage() { fi local percentage=$(upower -i $battery | awk '/percentage:/ {print $2}') if [ "$percentage" ]; then - echo ${percentage%.*%} + echo "$(float2int $percentage)%" return fi local energy