Signed-off-by: Rainer Bendig <hexathos@mailbox.org>
This commit is contained in:
2020-02-25 23:55:12 +01:00
parent 5ba5cf9f2b
commit 9b3266a32e
33 changed files with 1551 additions and 0 deletions

15
awesome/widgets/memory/mem.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
# Copyright 2015 Alexander Tsepkov
#
colorize_title='1s/\(.*\)/<span foreground="#669900"><b>\1<\/b><\/span>/'
case "$1" in
simple)
free | grep Mem | awk '{printf("%.1f\n", $3/$2 * 100)}'
;;
summary)
free -h | sed -e "$colorize_title"
echo ''
ps -eo pid:6,time:10,pmem:6,rss:8,comm --sort -rss | head -n 20 | sed -e "$colorize_title"
;;
esac