diff options
author | streetturtle <streetturtle@users.noreply.github.com> | 2018-09-22 18:51:54 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-22 18:51:54 -0400 |
commit | 8c623286a3dc1334929ae96971bd53c92211ffd6 (patch) | |
tree | 7935b8a580bb43e4cc165161c25f34fba5e4f4e3 /cpu-widget | |
parent | 23a85097fe4e7de166a07b8cf64e7effb0ded64a (diff) | |
parent | 8c3f67920be60d3e8f9e55dd9d5cc919de844061 (diff) |
Merge pull request #50 from myxo/master
Calling bash in watch command
Diffstat (limited to '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 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') |