summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWesley Gahr <wesleygahr@pop-os.localdomain>2020-09-27 04:16:46 +0200
committerWesley Gahr <wesleygahr@pop-os.localdomain>2020-09-27 04:16:46 +0200
commit7966f52057ee110dbcaff7f6b0446b1f5cda8ede (patch)
tree682d8dfc8e844b0d7d57d027ce121f528195486a
parenta0b4dc57619a5378c555fa5193ef97e038dce776 (diff)
Removing cat into grep, reading file directly
-rw-r--r--cpu-widget/cpu-widget.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpu-widget/cpu-widget.lua b/cpu-widget/cpu-widget.lua
index 8d5f497..e141065 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 "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