Compare commits
1 Commits
2b26a4fa84
...
1c56355ed4
Author | SHA1 | Date | |
---|---|---|---|
1c56355ed4 |
@ -19,10 +19,9 @@ 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