Skip to content

Commit

Permalink
Update battery_percentage.sh
Browse files Browse the repository at this point in the history
Add pull request tmux-plugins#89 
- Fix battery percentage output when using upower 
( tmux-plugins#89 )
  • Loading branch information
slange-dev authored Dec 17, 2024
1 parent 8d58825 commit 3ecf749
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/battery_percentage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3ecf749

Please sign in to comment.