Added System bars window

This commit is contained in:
soraefir committed 2023-11-21 19:19:09 +01:00
1 parent 8a833d1eb6
commit c58f0dceda
29 files changed
+201 -1093

No files matched your search

@@ -8,7 +8,5 @@ human() {
free --si -s 3 | rg --line-buffered Mem | while read -r line; do
used=$(echo "$line" | awk '{print $3}')
perc=$(awk -v used="$used" -v total="$total" 'BEGIN{print sprintf("%.f", used/total*100)}')
echo '{"total": "'$(human "$total")'", "used": "'$(human "$used")'", "percent": '$perc'}'
echo '{"human": { "total": "'$(human "$total")'", "used": "'$(human "$used")'"}, "total": "'$total'" , "used": "'$used'"}'
done