add doc to graphics
This commit is contained in:
parent
0cb38ea880
commit
d64b57fc3b
|
@ -227,7 +227,15 @@ local nvidia_off = function(cr)
|
|||
end
|
||||
|
||||
local update = function(cr)
|
||||
-- check if bbswitch is on
|
||||
if util.read_file('/proc/acpi/bbswitch', '.+%s+(%u+)') == 'ON' then
|
||||
|
||||
-- bbswitch might be on, but only because conky is constantly querying
|
||||
-- it and there appears to be some lag between closing all optirun
|
||||
-- processes and flipping bbswitch off. If bbswitch is on and there are
|
||||
-- no optirun processes, we call this "Mixed." In this case we don't
|
||||
-- check anything (to allow bbswitch to actually switch off) and set all
|
||||
-- values to N/A and 0.
|
||||
if __string_find(util.execute_cmd('ps -A -o comm'), 'optirun') == nil then
|
||||
Text.set(status.value, cr, 'Mixed')
|
||||
nvidia_off(cr)
|
||||
|
|
Loading…
Reference in New Issue