Powerarrow: fix a problem in the brightness widget that made awesome use

too much CPU load
This commit is contained in:
GrayJack 2019-02-13 01:22:00 -02:00
parent 55c720528f
commit 6081139506
1 changed files with 2 additions and 2 deletions

View File

@ -274,8 +274,8 @@ local net = lain.widget.net({
-- Brigtness
local brighticon = wibox.widget.imagebox(theme.widget_brightness)
-- If you use xbacklight, comment the line with "light -G" and uncomment the line bellow
-- local brightwidget = awful.widget.watch('xbacklight -get', 0,
local brightwidget = awful.widget.watch('light -G', 0,
-- local brightwidget = awful.widget.watch('xbacklight -get', 0.1,
local brightwidget = awful.widget.watch('light -G', 0.1,
function(widget, stdout, stderr, exitreason, exitcode)
local brightness_level = tonumber(string.format("%.0f", stdout))
widget:set_markup(markup.font(theme.font, " " .. brightness_level .. "%"))