Update regex
This commit is contained in:
parent
620e539852
commit
ed316bb564
4
cbattery
4
cbattery
|
@ -38,7 +38,7 @@ function disable_charging() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_smc_charging_hex() {
|
function get_smc_charging_hex() {
|
||||||
smc -k CH0B -r | awk '{print $4}' | sed 's:\)::'
|
smc -k CH0B -r | awk '{print $4}' | sed s:\)::
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_smc_charging_status() {
|
function get_smc_charging_status() {
|
||||||
|
@ -51,7 +51,7 @@ function get_smc_charging_status() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_battery_percentage() {
|
function get_battery_percentage() {
|
||||||
battery_percentage=$(pmset -g batt | tail -n1 | awk '{print $3}' | sed 's:%\;::')
|
battery_percentage=$(pmset -g batt | tail -n1 | awk '{print $3}' | sed s:%\;::)
|
||||||
echo "$battery_percentage"
|
echo "$battery_percentage"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue