feat: init binds config

This commit is contained in:
2026-05-29 20:17:27 -04:00
parent c2ba1a2f67
commit 51166b0f3a
9 changed files with 150 additions and 57 deletions
+19 -3
View File
@@ -16,7 +16,7 @@ local function merge(...)
return out
end
local function with_leader(keys)
function bind.with_leader(keys)
if keys == nil or keys == "" then
return bind.leader
end
@@ -34,8 +34,24 @@ function bind.key(keys, dispatcher, desc, opts)
return hl.bind(keys, dispatcher, flags)
end
function bind.leader_key(keys, dispatcher, desc, opts)
return bind.key(with_leader(keys), dispatcher, desc, opts)
function bind.set(table)
local keys = table.keys
local dispatcher = table.dispatcher
local desc = ""
local opts = {}
if table.desc ~= nil and table.desc ~= "" then
desc = table.desc
end
if table.opts ~= nil then
opts = table.opts
end
bind.key(keys, dispatcher, desc, opts)
end
function bind.map(table)
for _, item in pairs(table) do
bind.set(item)
end
end
return bind
+7
View File
@@ -18,6 +18,13 @@ settings["default_layout"] = "dwindle"
---@type string
settings["font_family"] = "FiraCode Nerd Font"
---@type table<string, string>
settings["apps"] = {
terminal = "kitty",
file_manager = "thunar",
browser = "chromium",
}
---@type "catppuccin"|"catppuccin-mocha"
settings["colorscheme"] = "catppuccin"