Skip to content

Commit d64c7fe

Browse files
justincampbellmartinbeentjes
authored andcommitted
Fix missing argument to awk (#53)
Fixes time remaining when short=true
1 parent 3d7cfed commit d64c7fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/battery_remain.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pmset_battery_remaining_time() {
2727
local remaining_time="$(echo $status | grep -o '[0-9]\{1,2\}:[0-9]\{1,2\}')"
2828
if battery_discharging; then
2929
if $short; then
30-
echo $remaining_time | awk '{printf "~%s"}'
30+
echo $remaining_time | awk '{printf "~%s", $1}'
3131
else
3232
echo $remaining_time | awk '{printf "- %s left", $1}'
3333
fi

0 commit comments

Comments
 (0)