This commit is contained in:
Agnosto Dvonik 2023-07-07 10:45:46 -04:00
parent a3a9d627bb
commit 43242890e1

View File

@ -1,6 +1,5 @@
#!/usr/bin/env sh #!/usr/bin/env sh
fg=#141414
red=#cf6a4c red=#cf6a4c
green=#99ad6a green=#99ad6a
yellow=#d8ad4c yellow=#d8ad4c
@ -23,10 +22,8 @@ batt() {
used() { used() {
used=$(vmstat | awk 'END {printf $3}' | tr -d "M") used=$(vmstat | awk 'END {printf $3}' | tr -d "M")
full=$(expr $(sysctl -n hw.usermem) / 1048576) full=$(expr $(sysctl -n hw.usermem) / 1048576)
tp=$(expr $full / 2)
[ $used -ge $tp ] && c=$red || c=$fg
echo "%{F$c}$used/$full%{F$fg}" echo "$used/$full"
} }
chkinet() { chkinet() {