rc.lua: Do not hardcode the default client buttons.
This commit moves the previously hardcoded client button list to the `awful.client` default button set. This will allow modules to add their own buttons. In later commit, those default buttons will also be added dynamically to existing clients.
This commit is contained in:
parent
44a665d381
commit
767a8e4f6d
|
@ -437,7 +437,8 @@ awful.keyboard.append_global_keybindings({
|
||||||
})
|
})
|
||||||
|
|
||||||
-- @DOC_CLIENT_BUTTONS@
|
-- @DOC_CLIENT_BUTTONS@
|
||||||
clientbuttons = {
|
client.connect_signal("request::default_mousebindings", function()
|
||||||
|
awful.mouse.append_client_mousebindings({
|
||||||
awful.button({ }, 1, function (c)
|
awful.button({ }, 1, function (c)
|
||||||
c:emit_signal("request::activate", "mouse_click", {raise = true})
|
c:emit_signal("request::activate", "mouse_click", {raise = true})
|
||||||
end),
|
end),
|
||||||
|
@ -449,7 +450,8 @@ clientbuttons = {
|
||||||
c:emit_signal("request::activate", "mouse_click", {raise = true})
|
c:emit_signal("request::activate", "mouse_click", {raise = true})
|
||||||
awful.mouse.client.resize(c)
|
awful.mouse.client.resize(c)
|
||||||
end),
|
end),
|
||||||
}
|
})
|
||||||
|
end)
|
||||||
|
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
|
@ -465,7 +467,6 @@ awful.rules.rules = {
|
||||||
focus = awful.client.focus.filter,
|
focus = awful.client.focus.filter,
|
||||||
raise = true,
|
raise = true,
|
||||||
keys = clientkeys,
|
keys = clientkeys,
|
||||||
buttons = clientbuttons,
|
|
||||||
screen = awful.screen.preferred,
|
screen = awful.screen.preferred,
|
||||||
placement = awful.placement.no_overlap+awful.placement.no_offscreen
|
placement = awful.placement.no_overlap+awful.placement.no_offscreen
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue