mirror of
https://github.com/actuallymentor/battery.git
synced 2026-02-03 05:53:24 +00:00
add support for ',' decimal seperator
This commit is contained in:
@@ -229,7 +229,7 @@ function get_maintain_percentage() {
|
||||
}
|
||||
|
||||
function get_voltage() {
|
||||
voltage=$(ioreg -l -n AppleSmartBattery -r | grep "\"Voltage\" =" | awk '{ print $3/1000 }')
|
||||
voltage=$(ioreg -l -n AppleSmartBattery -r | grep "\"Voltage\" =" | awk '{ print $3/1000 }' | tr ',' '.')
|
||||
echo "$voltage"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user