From 7c59a7c54e61faf1184967006bf4f5be193ceeb2 Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Tue, 8 Sep 2026 11:51:25 -0400 Subject: [PATCH] feat(config): switch Goliath launch to mosh and tighten key repeat settings --- dot_config/hypr/bindings.lua | 6 +++++- dot_config/hypr/input.lua | 20 ++++++++++++++++++++ dot_config/kitty/goliath.conf | 14 +++++++++++--- dot_config/niri/exact_config.d/70-binds.kdl | 3 ++- 4 files changed, 38 insertions(+), 5 deletions(-) diff --git a/dot_config/hypr/bindings.lua b/dot_config/hypr/bindings.lua index e1df3ad..b678e21 100644 --- a/dot_config/hypr/bindings.lua +++ b/dot_config/hypr/bindings.lua @@ -196,7 +196,11 @@ o.bind("SUPER + CTRL + ALT + W", "tldraw", "omarchy-launch-or-focus tldraw \"gtk o.bind("SUPER + CTRL + ALT + SPACE", "Sticky notes", "omarchy-launch-or-focus sticky \"gtk-launch io.github.faridjaff.StickyNotesCanvas\"") hl.unbind("SUPER + SHIFT + G") -- was: Signal -o.bind("SUPER + SHIFT + G", "Goliath", { launch = "kitty --title=goliath ssh -t goliath tmux new-session -A -s main" }) +-- The ssh/mosh command and tmux keymaps live in ~/.config/kitty/goliath.conf +-- (kitty cannot take --config from a `launch` action, hence a separate kitty +-- process, same trick as SUPER + T / SUPER + A). kitty-goliath is the app-id +-- looknfeel.lua's terminal blur rule expects. +o.bind("SUPER + SHIFT + G", "Goliath", { launch = "kitty --class=kitty-goliath --title=goliath --config ~/.config/kitty/goliath.conf" }) -- ─── Screenshots ──────────────────────────────────────────────────────────── diff --git a/dot_config/hypr/input.lua b/dot_config/hypr/input.lua index 76315c2..0b690de 100644 --- a/dot_config/hypr/input.lua +++ b/dot_config/hypr/input.lua @@ -1,6 +1,26 @@ -- Keep only your personal input overrides here. Uncommented settings below -- replace Omarchy's defaults. +-- Key repeat. Repeat is synthesized by the compositor (wl_keyboard.repeat_info +-- -> the client repeats locally), so this costs nothing on the wireless link. +-- Omarchy's 250ms / 40Hz already beats Hyprland's 600 / 25; tighten it further +-- so held keys (backspace, arrows, vim motions) start and stream sooner. +-- +-- Everything else in the keystroke path was checked and is already optimal for +-- the Pilot W-Corne (55d4:0461, Vial/QMK over a 2.4GHz dongle): the dongle +-- advertises bInterval=1 (1000Hz polling), udev pins power/control=on (no USB +-- autosuspend), nothing polls its raw-HID interface, WiFi sits on 5GHz, and +-- render:new_render_scheduling is off (no triple-buffer frame of latency). +-- Remaining latency is the 60Hz Studio Display refresh and the fcitx5 +-- input-method hop (see omarchy-fcitx5.service), neither of which is an +-- input option. +hl.config({ + input = { + repeat_delay = 200, + repeat_rate = 50, + }, +}) + -- Keyboard layout and options. -- See https://wiki.hypr.land/Configuring/Basics/Variables/#input -- hl.config({ diff --git a/dot_config/kitty/goliath.conf b/dot_config/kitty/goliath.conf index e9f0162..67723ff 100644 --- a/dot_config/kitty/goliath.conf +++ b/dot_config/kitty/goliath.conf @@ -1,7 +1,15 @@ -include ssh.conf listen_on unix:@kitty-goliath -# open straight into goliath's tmux -shell ssh -t goliath tmux new-session -A -s main +# open straight into goliath's tmux, over mosh: the UDP session survives +# suspend, roaming and dead links, and reconnects itself. mosh-server allocates +# the remote pty, so there is no `ssh -t` equivalent to pass. Caveat: mosh runs +# its bootstrap ssh with `-S none`, so it can never ride a ControlMaster -- +# non-interactive key auth to goliath must work or every launch prompts for a +# password. Needs mosh on both ends and UDP 60000-61000 open on goliath. +# mosh also rewrites TERM to xterm-256color (it only forwards a color count), +# so xterm-kitty-only capabilities (undercurl, ...) are gone inside the session. +# MOSH_TITLE_NOPREFIX drops mosh's "[mosh] " window-title prefix. +env MOSH_TITLE_NOPREFIX=1 +shell mosh goliath -- tmux new-session -A -s main # structural keys forward to tmux (prefix C-b = \x02) map super+w send_text all \x02x map super+t send_text all \x02% diff --git a/dot_config/niri/exact_config.d/70-binds.kdl b/dot_config/niri/exact_config.d/70-binds.kdl index ff6f2e5..34292dc 100644 --- a/dot_config/niri/exact_config.d/70-binds.kdl +++ b/dot_config/niri/exact_config.d/70-binds.kdl @@ -20,7 +20,8 @@ binds { Mod+Ctrl+R { spawn "noctalia" "msg" "plugin" "prdlk/ostt:recorder" "focused" "toggle"; } // ii Region tools - Mod+Shift+G { spawn "kitty" "--title=goliath" "ssh" "-t" "goliath" "tmux" "new-session" "-A" "-s" "main"; } + // Goliath: mosh + tmux and the tmux keymaps live in ~/.config/kitty/goliath.conf + Mod+Shift+G { spawn-sh "kitty --class=kitty-goliath --title=goliath --config ~/.config/kitty/goliath.conf"; } Mod+S { spawn "dot-screenshot" "region"; } Mod+Shift+S { spawn "dot-screenshot" "window"; } Mod+Ctrl+S { spawn "dot-screenshot" "monitor-focused"; }