diff options
author | streetturtle <streetturtle@users.noreply.github.com> | 2020-09-28 16:51:43 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-28 16:51:43 -0400 |
commit | aec00b44ed0d677e9deb27ac3eb85fd760646d94 (patch) | |
tree | 56708f9afdf76da5928a242ff85a31ce0dd07357 | |
parent | e5fe41e4ada14c2e759efaf89571f6c4d31ccc51 (diff) | |
parent | 80a3fbb6f9077e1c432abd0cd3392dfdbaac63df (diff) |
Merge pull request #192 from voider1/cpu-widget-performance
Improving performance of CPU widget
-rw-r--r-- | cpu-widget/cpu-widget.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cpu-widget/cpu-widget.lua b/cpu-widget/cpu-widget.lua index 8d5f497..317ef0a 100644 --- a/cpu-widget/cpu-widget.lua +++ b/cpu-widget/cpu-widget.lua @@ -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 "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 |