mirror of
https://codeberg.org/muon/home.git
synced 2026-03-09 20:03:12 +00:00
Fix ud and ssh
This commit is contained in:
parent
5518f1ca35
commit
c9be88c1b6
1 changed files with 27 additions and 3 deletions
|
|
@ -207,6 +207,18 @@ in {
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- scroll_or_passthrough: Ctrl+key scrolls at the shell prompt but passes
|
||||||
|
-- the key through when a program has taken the alt screen (vim, less, fzf…).
|
||||||
|
local function scroll_or_passthrough(key, pages)
|
||||||
|
return wezterm.action_callback(function(window, pane)
|
||||||
|
if pane:is_alt_screen_active() then
|
||||||
|
window:perform_action(act.SendKey({ key = key, mods = "CTRL" }), pane)
|
||||||
|
else
|
||||||
|
window:perform_action(act.ScrollByPage(pages), pane)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
-- tab_is_zoomed: true if any pane in the current tab is zoomed.
|
-- tab_is_zoomed: true if any pane in the current tab is zoomed.
|
||||||
-- Used by move_vertical to decide whether to carry zoom forward.
|
-- Used by move_vertical to decide whether to carry zoom forward.
|
||||||
local function tab_is_zoomed(pane)
|
local function tab_is_zoomed(pane)
|
||||||
|
|
@ -382,6 +394,16 @@ in {
|
||||||
}
|
}
|
||||||
config.tab_bar_at_bottom = false
|
config.tab_bar_at_bottom = false
|
||||||
|
|
||||||
|
-- ─── SSH Domains ───────────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
config.ssh_domains = {
|
||||||
|
{
|
||||||
|
name = "muho",
|
||||||
|
remote_address = "muho",
|
||||||
|
username = "muon",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
-- ─── Shell ─────────────────────────────────────────────────────────────────
|
-- ─── Shell ─────────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
${lib.optionalString (shell != null) ''
|
${lib.optionalString (shell != null) ''
|
||||||
|
|
@ -471,9 +493,11 @@ in {
|
||||||
{ key = "t", mods = "ALT", action = act.ShowTabNavigator },
|
{ key = "t", mods = "ALT", action = act.ShowTabNavigator },
|
||||||
-- Alt+q: quit
|
-- Alt+q: quit
|
||||||
{ key = "q", mods = "ALT", action = act.QuitApplication },
|
{ key = "q", mods = "ALT", action = act.QuitApplication },
|
||||||
-- Ctrl+U/D: scroll half page (matches Alacritty)
|
-- Ctrl+U/D: scroll half page when at the shell prompt; pass through
|
||||||
{ key = "u", mods = "CTRL", action = act.ScrollByPage(-0.5) },
|
-- to the running program when it is using the alt screen (vim, less,
|
||||||
{ key = "d", mods = "CTRL", action = act.ScrollByPage(0.5) },
|
-- fzf, etc. switch to the alt screen and need the raw key).
|
||||||
|
{ key = "u", mods = "CTRL", action = scroll_or_passthrough("u", -0.5) },
|
||||||
|
{ key = "d", mods = "CTRL", action = scroll_or_passthrough("d", 0.5) },
|
||||||
-- Copy / paste
|
-- Copy / paste
|
||||||
{ key = "c", mods = "CTRL|SHIFT", action = act.CopyTo("Clipboard") },
|
{ key = "c", mods = "CTRL|SHIFT", action = act.CopyTo("Clipboard") },
|
||||||
{ key = "v", mods = "CTRL|SHIFT", action = act.PasteFrom("Clipboard") },
|
{ key = "v", mods = "CTRL|SHIFT", action = act.PasteFrom("Clipboard") },
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue