Adds wezterm config as home manager module

This commit is contained in:
Dennis Schoepf 2025-01-24 21:49:19 +01:00
parent 98f4a6679e
commit 8d604f9278
9 changed files with 358 additions and 0 deletions

View file

@ -0,0 +1,33 @@
local wezterm = require("wezterm")
local helpers = require("helpers")
local M = {}
function M.choose()
local choices = {}
for _, value in ipairs(helpers.project_dirs()) do
table.insert(choices, { label = value })
end
return wezterm.action.InputSelector({
title = "Projects",
choices = choices,
fuzzy = true,
action = wezterm.action_callback(function(child_window, child_pane, _, label)
if not label then
return
end
child_window:perform_action(
wezterm.action.SwitchToWorkspace({
name = label:match("([^/]+)$"),
spawn = { cwd = label },
}),
child_pane
)
end),
})
end
return M