Skip to content

Commit 0272f2f

Browse files
TsutomuNakamuramartinbeentjes
authored andcommitted
Modified not to print under the decimal points. (#83)
1 parent 8f1626f commit 0272f2f

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
@@ -18,7 +18,7 @@ print_battery_percentage() {
1818
fi
1919
local percentage=$(upower -i $battery | awk '/percentage:/ {print $2}')
2020
if [ "$percentage" ]; then
21-
echo $percentage
21+
echo ${percentage%.*%}
2222
return
2323
fi
2424
local energy

0 commit comments

Comments
 (0)