awesomewm/modules/backlight/keybinds.lua

59 lines
1021 B
Lua
Raw Normal View History

2022-07-16 16:06:02 -07:00
local backlight = req_rel(..., "util")
2021-08-01 07:24:26 -07:00
return gears.table.join(
awful.key( {}, "XF86MonBrightnessUp",
function ()
2022-07-16 16:06:02 -07:00
backlight.backlight_up()
2021-08-01 07:24:26 -07:00
end,
{
description = "Raise brightness",
group = "System"
}
),
awful.key( {}, "XF86MonBrightnessDown",
function ()
2022-07-16 16:06:02 -07:00
backlight.backlight_down()
2021-08-01 07:24:26 -07:00
end,
{
description = "Lower brightness",
group = "System"
}
),
awful.key( { "Mod4" }, "o",
function ()
2022-07-16 16:06:02 -07:00
backlight.redshift(5600)
2021-08-01 07:24:26 -07:00
end,
{
description = "Default redshift",
group = "System"
}
),
awful.key( { "Mod4", "Shift" }, "o",
function ()
2022-07-16 16:06:02 -07:00
backlight.reset_redshift()
2021-08-01 07:24:26 -07:00
end,
{
description = "Reset redshift",
group = "System"
}
),
awful.key( { "Mod4", "Shift", "Control" }, "o",
function ()
2022-07-16 16:06:02 -07:00
backlight.reset_redshift()
2021-08-01 07:24:26 -07:00
awful.prompt.run {
prompt = "<b>Color temperature: </b>",
textbox = awful.screen.focused().mypromptbox.widget,
2022-07-16 16:06:02 -07:00
exe_callback = backlight.redshift
2021-08-01 07:24:26 -07:00
}
end,
{
description = "Set redshift",
group = "System"
}
)
)