[awesome] better regex for redshift widget to check if process is running

legacy
Simon Bruder 2019-06-07 18:54:06 +00:00
parent de0f80f6f2
commit eab68ccb0e
No known key found for this signature in database
GPG Key ID: 6F03E0000CC5B62F
1 changed files with 1 additions and 1 deletions

View File

@ -112,7 +112,7 @@ helpers.newtimer("bluetooth", 10, widgets.bluetooth.update)
widgets.redshift = wibox.widget.imagebox(iconsdir .. "redshift-on.png")
widgets.redshift.pid = nil
helpers.async_with_shell("ps x -o pid=,command=|grep -E 'redshift$' |cut -d' ' -f 1", function(pid)
helpers.async_with_shell("ps x -o pid=,command=|grep -E '^[0-9]* redshift$' |cut -d' ' -f 1", function(pid)
if pid and #pid > 0 then
widgets.redshift.pid = tonumber(pid)
else