From 8c3f67920be60d3e8f9e55dd9d5cc919de844061 Mon Sep 17 00:00:00 2001 From: Klimov Nikolay Date: Thu, 20 Sep 2018 19:20:27 +0300 Subject: Calling bash in watch command --- cpu-widget/cpu-widget.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cpu-widget') diff --git a/cpu-widget/cpu-widget.lua b/cpu-widget/cpu-widget.lua index f7fc2e4..f466d09 100644 --- a/cpu-widget/cpu-widget.lua +++ b/cpu-widget/cpu-widget.lua @@ -27,7 +27,7 @@ local cpu_widget = wibox.container.margin(wibox.container.mirror(cpugraph_widget local total_prev = 0 local idle_prev = 0 -watch("cat /proc/stat | grep '^cpu '", 1, +watch([[bash -c "cat /proc/stat | grep '^cpu '"]], 1, function(widget, stdout, stderr, exitreason, exitcode) local user, nice, system, idle, iowait, irq, softirq, steal, guest, guest_nice = stdout:match('(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s') -- cgit v1.2.3