Compare commits
1 Commits
1c56355ed4
...
2b26a4fa84
Author | SHA1 | Date | |
---|---|---|---|
2b26a4fa84 |
@ -19,9 +19,10 @@ ioreg -w0 -l|grep BatteryInstalled &> /dev/null && \
|
|||||||
while true; do
|
while true; do
|
||||||
# Get the current CPU temperature.
|
# Get the current CPU temperature.
|
||||||
cpu_temp="`/usr/local/bin/osx-cpu-temp`"
|
cpu_temp="`/usr/local/bin/osx-cpu-temp`"
|
||||||
|
if $has_battery; then
|
||||||
# Parse the current battery charge percentage.
|
# Parse the current battery charge percentage.
|
||||||
$has_battery && \
|
|
||||||
battery=" `pmset -g batt | grep --color=never -Eo '\d+%'` ↯"
|
battery=" `pmset -g batt | grep --color=never -Eo '\d+%'` ↯"
|
||||||
|
fi
|
||||||
# Write to the cache file.
|
# Write to the cache file.
|
||||||
echo "$cpu_temp$battery" > $cache_file
|
echo "$cpu_temp$battery" > $cache_file
|
||||||
# Don't spin, sleep instead.
|
# Don't spin, sleep instead.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user