forked from ashpie/simple-awesome
Add configurable custom hotkeys
This commit is contained in:
parent
abacea8562
commit
e5d7c9a578
@ -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
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user