[awesome] better regex for redshift widget to check if process is running
This commit is contained in:
parent
de0f80f6f2
commit
eab68ccb0e
|
@ -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
|
||||
|
|
Reference in a new issue