blob: 37267ed7679884bc6abd43466a993b095faa52d7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
-- 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,
}
|