add lag-triage diagnostic toolkit for post-TUI typing lag

This commit is contained in:
Noah Masur
2026-08-29 14:04:44 -06:00
parent 68320577ae
commit fe2843ead6
6 changed files with 388 additions and 0 deletions
@@ -0,0 +1,38 @@
{
config,
pkgs,
lib,
...
}:
let
cfg = config.nmasur.presets.programs.lag-triage;
term-probe = pkgs.writeScriptBin "term-probe" ''
#!${lib.getExe pkgs.python3}
${builtins.readFile ./term_probe.py}
'';
in
{
options.nmasur.presets.programs.lag-triage.enable =
lib.mkEnableOption "Terminal input-lag triage tools";
config = lib.mkIf cfg.enable {
home.packages = [ term-probe ];
programs.fish.functions = {
lag-triage = {
description = "Diagnose post-TUI typing lag in the current shell";
body = builtins.readFile ./lag-triage.fish;
};
unlag = {
description = "Reset terminal state left behind by a TUI";
body = builtins.readFile ./unlag.fish;
};
};
};
}