19 lines
432 B
Lua
19 lines
432 B
Lua
local vars = require "misc.vars"
|
|
local wibox = require "wibox"
|
|
local h = require "misc.helpers"
|
|
|
|
local brightness = wibox.widget {
|
|
widget = wibox.container.place,
|
|
{
|
|
widget = wibox.widget.textbox,
|
|
font = vars.font,
|
|
text = ""
|
|
},
|
|
}
|
|
|
|
h.tooltip({ brightness }, function()
|
|
return math.floor(tonumber(io.popen("brightnessctl g"):read("*a"):sub(0, -2)) / 255 * 100) .. "%"
|
|
end)
|
|
|
|
return brightness
|