summaryrefslogtreecommitdiff
path: root/cpu-widget
diff options
context:
space:
mode:
authorstreetturtle <streetturtle@users.noreply.github.com>2021-09-19 21:52:46 -0400
committerGitHub <noreply@github.com>2021-09-19 21:52:46 -0400
commit9d9658799f79f6dc14643bb9393f8ce11c65b156 (patch)
tree1604aea8af0efb38811f8f50dd8058218b25ec69 /cpu-widget
parent3c579e20d6c75a921dc6d58d6c88cd62af952fdf (diff)
parent6e7c1dc4be830038c1371797169b8cded107e535 (diff)
Merge pull request #298 from floli/optimize-cpu-cmd
Make the CMD_slim command even slimmer.
Diffstat (limited to 'cpu-widget')
-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 c8b90c8..11debe8 100644
--- a/cpu-widget/cpu-widget.lua
+++ b/cpu-widget/cpu-widget.lua
@@ -18,7 +18,7 @@ local CMD = [[sh -c "grep '^cpu.' /proc/stat; ps -eo '%p|%c|%C|' -o "%mem" -o '|
.. [[| head -11 | tail -n +2"]]
-- A smaller command, less resource intensive, used when popup is not shown.
-local CMD_slim = [[sh -c "grep '^cpu.' /proc/stat | head -n 1" ]]
+local CMD_slim = [[grep --max-count=1 '^cpu.' /proc/stat]]
local HOME_DIR = os.getenv("HOME")
local WIDGET_DIR = HOME_DIR .. '/.config/awesome/awesome-wm-widgets/cpu-widget'