Removing cat into grep, reading file directly
This commit is contained in:
parent
a0b4dc5761
commit
7966f52057
|
@ -139,7 +139,7 @@ local function worker(args)
|
|||
local cpu_widget = wibox.container.margin(wibox.container.mirror(cpugraph_widget, { horizontal = true }), 0, 0, 0, 2)
|
||||
|
||||
local cpus = {}
|
||||
watch([[bash -c "cat /proc/stat | grep '^cpu.' ; ps -eo '%p|%c|%C|' -o "%mem" -o '|%a' --sort=-%cpu | head -11 | tail -n +2"]], timeout,
|
||||
watch([[bash -c "cat /proc/stat | grep '^cpu.' /proc/stat; ps -eo '%p|%c|%C|' -o "%mem" -o '|%a' --sort=-%cpu | head -11 | tail -n +2"]], timeout,
|
||||
function(widget, stdout)
|
||||
local i = 1
|
||||
local j = 1
|
||||
|
|
Loading…
Reference in New Issue