mirror of
https://github.com/lcpz/awesome-copycats.git
synced 2024-12-22 19:22:32 +00:00
Powerarrow: fix a problem in the brightness widget that made awesome use
too much CPU load
This commit is contained in:
parent
55c720528f
commit
6081139506
|
@ -274,8 +274,8 @@ local net = lain.widget.net({
|
||||||
-- Brigtness
|
-- Brigtness
|
||||||
local brighticon = wibox.widget.imagebox(theme.widget_brightness)
|
local brighticon = wibox.widget.imagebox(theme.widget_brightness)
|
||||||
-- If you use xbacklight, comment the line with "light -G" and uncomment the line bellow
|
-- 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('xbacklight -get', 0.1,
|
||||||
local brightwidget = awful.widget.watch('light -G', 0,
|
local brightwidget = awful.widget.watch('light -G', 0.1,
|
||||||
function(widget, stdout, stderr, exitreason, exitcode)
|
function(widget, stdout, stderr, exitreason, exitcode)
|
||||||
local brightness_level = tonumber(string.format("%.0f", stdout))
|
local brightness_level = tonumber(string.format("%.0f", stdout))
|
||||||
widget:set_markup(markup.font(theme.font, " " .. brightness_level .. "%"))
|
widget:set_markup(markup.font(theme.font, " " .. brightness_level .. "%"))
|
||||||
|
|
Loading…
Reference in a new issue