-- Note that this widget only shows backlight level when it changes. widget = luastatus.require_plugin('backlight-linux').widget{ cb = function(level) if level ~= nil then local brightness = level * 100 local icon = "󰃠" if brightness < 30 then icon = "󰃞" elseif brightness < 70 then icon = "󰃟" end io.write(level * 100) return string.format('%s %3.0f%%', icon, brightness) end end, }