Allow reloading of keybindings without restarting awesome

This commit is contained in:
Alexander Gehrke 2020-07-22 14:32:46 +02:00
parent bb4e0cfd29
commit 34f210646e
3 changed files with 88 additions and 64 deletions

5
rc.lua
View file

@ -64,8 +64,9 @@ binder.modal.hide_default_options()
--binder.modal.set_x_offset(18)
binder.add_default_bindings()
binder.add_bindings(tags.create_bindings())
binder.add_bindings(require("mybindings"))
binder.add_reloadable(tags.create_bindings)
mybindings = awful.util.getdir("config") .. "/mybindings.lua"
binder.add_reloadable(function() return dofile(mybindings) end)
binder.add_bindings(awful.util.table.join(
awful.key({}, "XF86AudioRaiseVolume", function() audiowheel:up() end),