Merge pull request #298 from floli/optimize-cpu-cmd

Make the CMD_slim command even slimmer.
This commit is contained in:
streetturtle 2021-09-19 21:52:46 -04:00 committed by GitHub
commit 9d9658799f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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'