Skip to content

Commit

Permalink
awesome: did xlock&audio&backlight keys. resolves #2
Browse files Browse the repository at this point in the history
  • Loading branch information
mkf committed Apr 25, 2020
1 parent 9751931 commit 3ffdb68
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .config/awesome/rc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,42 @@ for i = 0, 9 do
)
end

globalkeys = gears.table.join(globalkeys,
awful.key({}, "XF86Launch1", function () awful.spawn("xlock") end,
{description = "xlock", group = "useful"}))

brightness_steps = {
{n = 10, modi = {}},
{n = 5, modi = {modkey}},
{n = 1, modi = {"Mod1"}},
{n = 15, modi = {"Control"}},
{n = 25, modi = {"Shift"}}}

upanddown = {{key = "Down", opt = "dec"}, {key = "Up", opt = "inc"}}

for _, akey in ipairs(upanddown) do
for _, astep in ipairs(brightness_steps) do
globalkeys = gears.table.join(globalkeys,
awful.key(astep.modi, "XF86MonBrightness" .. (akey.key),
function () awful.spawn(
"xbacklight -" .. (akey.opt) .. " " .. (astep.n)) end,
{description = (astep.n), group = "xbacklight"}))
end
end

audiokeys = {
RaiseVolume = "up",
LowerVolume = "down",
Mute = "mute",
MicMute = "mute-input"}

for key, pa in pairs(audiokeys) do
globalkeys = gears.table.join(globalkeys,
awful.key({}, "XF86Audio"..key, function () awful.spawn(
"pulseaudio-ctl "..pa) end,
{description = "pulseaudio-ctl "..pa, group = "xf86Audio"}))
end

clientbuttons = gears.table.join(
awful.button({ }, 1, function (c)
c:emit_signal("request::activate", "mouse_click", {raise = true})
Expand Down

0 comments on commit 3ffdb68

Please sign in to comment.