+ mostram icon

This commit is contained in:
committer@tuxwarrior
2026-03-06 11:30:19 -05:00
parent 956795938f
commit 4ecedf09f2
2 changed files with 15 additions and 0 deletions

View File

@@ -14,6 +14,7 @@ displayResources() {
(grep 'cpu ' /proc/stat; sleep 0.1; grep 'cpu ' /proc/stat) | awk -v RS="" '{printf "%.1f%%", ($13-$2+$15-$4)*100/($13-$2+$15-$4+$16-$5)"%"}'
elif [[ "${operation}" == "topmem" ]]; then
# the process that consumes the most memory
echo /home/poq/.config/nwg-panel/icons/noun-ram-8252148.svg
ps -eo pid,cmd,%mem --sort=-%mem | head -n 2 | awk 'NR==2 {printf "%s: %s (%s%)", $1, $2, $4}'
elif [[ "${operation}" == "topcpu" ]]; then
# the process that consumes the most cpu