mirror of
https://github.com/agresdominik/dotfiles.git
synced 2026-04-21 18:05:50 +00:00
Update to dotfiles
This commit is contained in:
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
usage=$(mpstat 1 1 | awk '/Average/ {print 100 - $NF}')
|
||||
|
||||
temp=$(sensors | awk '/^Tctl:/ {gsub(/[+°]C/, "", $2); print $2; exit}')
|
||||
temp=${temp#+}
|
||||
|
||||
text="${usage}% ${temp}°C"
|
||||
|
||||
echo "$text"
|
||||
echo "$text"
|
||||
|
||||
if [ "$(printf "%.0f" "$usage")" -ge 90 ]; then
|
||||
echo "#ffcc66"
|
||||
else
|
||||
echo "#ffffff"
|
||||
fi
|
||||
Reference in New Issue
Block a user