diff --git a/default_config.lua b/default_config.lua index 95da713..c840cba 100644 --- a/default_config.lua +++ b/default_config.lua @@ -119,6 +119,21 @@ config.keys.global_keys = { } } +-- Custom global hotkeys +config.keys.custom_keys = { + -- Example: + -- { + -- hotkey = { + -- { config.keys.modkey, }, + -- "t" + -- }, + -- action = function() + -- awful.spawn('terminator') + -- end, + -- identity = { description = "open terminator", group = "utilities" } + -- } +}; + -- -- Widgets diff --git a/simple/init.lua b/simple/init.lua index a8bdf5f..8bb8663 100644 --- a/simple/init.lua +++ b/simple/init.lua @@ -351,8 +351,9 @@ root.buttons(gears.table.join(awful.button({}, 3, function() mymainmenu:toggle() -- }}} -- {{{ Key bindings -hotkey.registerKeys(awful.key({ config.keys.modkey, }, "s", hotkeys_popup.show_help, - { description = "show help", group = "awesome" }), +hotkey.registerKeys( + awful.key({ config.keys.modkey, }, "s", hotkeys_popup.show_help, + { description = "show help", group = "awesome" }), awful.key({ config.keys.modkey, }, "Escape", awful.tag.history.restore, { description = "go back", group = "tag" }), @@ -448,7 +449,14 @@ hotkey.registerKeys(awful.key({ config.keys.modkey, }, "s", hotkeys_popup.show_h { description = "show the run menu", group = "launcher" }), -- Flameshot awful.key({}, "Print", function() os.execute(config.screenshot_utility_command) end, - { description = "Take a screenshot using the screenshot utility", group = "utilities" })) + { description = "Take a screenshot using the screenshot utility", group = "utilities" }) +) + +for key in gears.table.iterate(config.keys.custom_keys, function() return true end) do + hotkey.registerKeys( + hotkey.make(key.hotkey, key.action, key.identity) + ) +end clientkeys = gears.table.join(-- tiling awful.key({ config.keys.modkey, }, "Right",