59 lines
1021 B
Lua
Executable File
59 lines
1021 B
Lua
Executable File
local backlight = req_rel(..., "util")
|
|
|
|
return gears.table.join(
|
|
awful.key( {}, "XF86MonBrightnessUp",
|
|
function ()
|
|
backlight.backlight_up()
|
|
end,
|
|
{
|
|
description = "Raise brightness",
|
|
group = "System"
|
|
}
|
|
),
|
|
|
|
awful.key( {}, "XF86MonBrightnessDown",
|
|
function ()
|
|
backlight.backlight_down()
|
|
end,
|
|
{
|
|
description = "Lower brightness",
|
|
group = "System"
|
|
}
|
|
),
|
|
|
|
awful.key( { "Mod4" }, "o",
|
|
function ()
|
|
backlight.redshift(5600)
|
|
end,
|
|
{
|
|
description = "Default redshift",
|
|
group = "System"
|
|
}
|
|
),
|
|
|
|
awful.key( { "Mod4", "Shift" }, "o",
|
|
function ()
|
|
backlight.reset_redshift()
|
|
end,
|
|
{
|
|
description = "Reset redshift",
|
|
group = "System"
|
|
}
|
|
),
|
|
|
|
awful.key( { "Mod4", "Shift", "Control" }, "o",
|
|
function ()
|
|
backlight.reset_redshift()
|
|
awful.prompt.run {
|
|
prompt = "<b>Color temperature: </b>",
|
|
textbox = awful.screen.focused().mypromptbox.widget,
|
|
exe_callback = backlight.redshift
|
|
}
|
|
end,
|
|
{
|
|
description = "Set redshift",
|
|
group = "System"
|
|
}
|
|
)
|
|
)
|