mirror of
https://github.com/lcpz/awesome-copycats.git
synced 2024-12-22 19:22:32 +00:00
Powerarrow: Added brightness widget (not set by default)
This commit is contained in:
parent
1b686432fe
commit
55c720528f
BIN
themes/powerarrow/icons/brightness.png
Normal file
BIN
themes/powerarrow/icons/brightness.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
|
@ -57,6 +57,7 @@ theme.widget_ac = theme.dir .. "/icons/ac.png"
|
||||||
theme.widget_battery = theme.dir .. "/icons/battery.png"
|
theme.widget_battery = theme.dir .. "/icons/battery.png"
|
||||||
theme.widget_battery_low = theme.dir .. "/icons/battery_low.png"
|
theme.widget_battery_low = theme.dir .. "/icons/battery_low.png"
|
||||||
theme.widget_battery_empty = theme.dir .. "/icons/battery_empty.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_mem = theme.dir .. "/icons/mem.png"
|
||||||
theme.widget_cpu = theme.dir .. "/icons/cpu.png"
|
theme.widget_cpu = theme.dir .. "/icons/cpu.png"
|
||||||
theme.widget_temp = theme.dir .. "/icons/temp.png"
|
theme.widget_temp = theme.dir .. "/icons/temp.png"
|
||||||
|
@ -270,6 +271,16 @@ local net = lain.widget.net({
|
||||||
end
|
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
|
-- Separators
|
||||||
local arrow = separators.arrow_left
|
local arrow = separators.arrow_left
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue