diff --git a/themes/powerarrow/icons/brightness.png b/themes/powerarrow/icons/brightness.png new file mode 100644 index 0000000..030d524 Binary files /dev/null and b/themes/powerarrow/icons/brightness.png differ diff --git a/themes/powerarrow/theme.lua b/themes/powerarrow/theme.lua index 15dcf55..d93b4c5 100644 --- a/themes/powerarrow/theme.lua +++ b/themes/powerarrow/theme.lua @@ -57,6 +57,7 @@ theme.widget_ac = theme.dir .. "/icons/ac.png" theme.widget_battery = theme.dir .. "/icons/battery.png" theme.widget_battery_low = theme.dir .. "/icons/battery_low.png" theme.widget_battery_empty = theme.dir .. "/icons/battery_empty.png" +theme.widget_brightness = theme.dir .. "/icons/brightness.png" theme.widget_mem = theme.dir .. "/icons/mem.png" theme.widget_cpu = theme.dir .. "/icons/cpu.png" theme.widget_temp = theme.dir .. "/icons/temp.png" @@ -270,6 +271,16 @@ local net = lain.widget.net({ end }) +-- 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, + function(widget, stdout, stderr, exitreason, exitcode) + local brightness_level = tonumber(string.format("%.0f", stdout)) + widget:set_markup(markup.font(theme.font, " " .. brightness_level .. "%")) +end) + -- Separators local arrow = separators.arrow_left