summaryrefslogtreecommitdiff
path: root/cpu-widget
diff options
context:
space:
mode:
Diffstat (limited to 'cpu-widget')
-rw-r--r--cpu-widget/README.md2
-rw-r--r--cpu-widget/cpu-widget.lua2
2 files changed, 3 insertions, 1 deletions
diff --git a/cpu-widget/README.md b/cpu-widget/README.md
index 8c4528c..b323f9b 100644
--- a/cpu-widget/README.md
+++ b/cpu-widget/README.md
@@ -1,5 +1,7 @@
# CPU widget
+[![GitHub issues by-label](https://img.shields.io/github/issues-raw/streetturtle/awesome-wm-widgets/cpu)](https://github.com/streetturtle/awesome-wm-widgets/labels/cpu)
+
This widget shows the average CPU load among all cores of the machine:
![screenshot](./cpu.gif)
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