feat: yazi, clean wezterm

This commit is contained in:
2025-04-12 15:38:25 +02:00
parent ab69b02641
commit 72e7700efb
30 changed files with 4361 additions and 28 deletions

View File

@ -55,11 +55,47 @@ return {
action = act.SplitHorizontal({ domain = "CurrentPaneDomain" }),
},
-- session manager
{ key = "s", mods = "LEADER", action = act({ EmitEvent = "save_session" }) },
{ key = "l", mods = "LEADER", action = act({ EmitEvent = "load_session" }) },
{ key = "r", mods = "LEADER", action = act({ EmitEvent = "restore_session" }) },
-- Rename current workspace
{
key = "$",
mods = "LEADER|SHIFT",
action = act.PromptInputLine({
description = "Enter new workspace name",
action = wezterm.action_callback(function(window, pane, line)
if line then
wezterm.mux.rename_workspace(wezterm.mux.get_active_workspace(), line)
end
end),
}),
},
-- Prompt for a name to use for a new workspace and switch to it.
{
key = "w",
mods = "LEADER|SHIFT",
action = act.PromptInputLine({
description = wezterm.format({
{ Attribute = { Intensity = "Bold" } },
{ Foreground = { AnsiColor = "Fuchsia" } },
{ Text = "Enter name for new workspace" },
}),
action = wezterm.action_callback(function(window, pane, line)
-- line will be `nil` if they hit escape without entering anything
-- An empty string if they just hit enter
-- Or the actual line of text they wrote
if line then
window:perform_action(
act.SwitchToWorkspace({
name = line,
}),
pane
)
end
end),
}),
},
},
key_tables = {
resize_pane = {
{ key = "LeftArrow", action = act.AdjustPaneSize({ "Left", 5 }) },