mirror of
https://github.com/elenapan/dotfiles.git
synced 2026-01-25 09:37:14 +08:00
Former-commit-id: 9d27077226ed0b65d857184ac61d556aae929eca Former-commit-id: 6683c18030af3da534b8d010b44fea577d5f1ab2 Former-commit-id: 12f11729e4f0f1fc343fe76c7ee2a8b5bf4491a0 Former-commit-id: 56fea3fbf6f672c41a2fc08936762dd67cfa0d73
31 lines
892 B
Lua
31 lines
892 B
Lua
local gears = require("gears")
|
|
local wibox = require("wibox")
|
|
local beautiful = require("beautiful")
|
|
|
|
-- Set colors
|
|
local active_color = beautiful.brightness_bar_active_color or "#5AA3CC"
|
|
local background_color = beautiful.brightness_bar_background_color or "#222222"
|
|
|
|
local brightness_bar = wibox.widget{
|
|
max_value = 100,
|
|
value = 50,
|
|
forced_height = dpi(10),
|
|
margins = {
|
|
top = dpi(8),
|
|
bottom = dpi(8),
|
|
},
|
|
forced_width = dpi(200),
|
|
shape = gears.shape.rounded_bar,
|
|
bar_shape = gears.shape.rounded_bar,
|
|
color = active_color,
|
|
background_color = background_color,
|
|
border_width = 0,
|
|
border_color = beautiful.border_color,
|
|
widget = wibox.widget.progressbar,
|
|
}
|
|
|
|
awesome.connect_signal("evil::brightness", function (value)
|
|
brightness_bar.value = value
|
|
end)
|
|
|
|
return brightness_bar
|