add doc to graphics

This commit is contained in:
petrucci4prez 2017-07-16 15:23:34 -04:00
parent 0cb38ea880
commit d64b57fc3b
1 changed files with 9 additions and 1 deletions

View File

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