@volter/supercode-teams 0.2.75 → 0.2.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/terminal-look.mjs +22 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/supercode-teams",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.77",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A machine daemon serving this machine's doors, and a local or remote Teams server for shared session discovery, OpenTelemetry ingestion and access to enrolled machines.",
|
|
6
6
|
"license": "MIT",
|
package/terminal-look.mjs
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// Basic profile (terminal-basic.mjs, the brand's terminal roles), light or dark with the system's appearance as Basic is.
|
|
6
6
|
// The config is WezTerm's own file, passed with `--config-file`; the person's ~/.wezterm.lua is not read for it.
|
|
7
7
|
import { execFileSync } from 'node:child_process';
|
|
8
|
-
import { existsSync, renameSync, writeFileSync } from 'node:fs';
|
|
8
|
+
import { existsSync, readFileSync, renameSync, writeFileSync } from 'node:fs';
|
|
9
9
|
import { tmpdir } from 'node:os';
|
|
10
10
|
import { join } from 'node:path';
|
|
11
11
|
import { TERMINAL_BASIC } from './terminal-basic.mjs';
|
|
@@ -125,17 +125,36 @@ export function weztermConfig(profile, { fontDirs = existsSync(TERMINAL_FONTS) ?
|
|
|
125
125
|
'config.enable_scroll_bar = false',
|
|
126
126
|
// Terminal.app does not ask before closing a window whose process is tmux (its default "ask before closing" list).
|
|
127
127
|
"config.window_close_confirmation = 'NeverPrompt'",
|
|
128
|
+
// A config reload re-arms WezTerm's file watcher while it holds the lock every key and mouse event takes, and
|
|
129
|
+
// arming the watcher waits on fseventsd: open windows stopped taking input for up to 2.3 s after each popup's
|
|
130
|
+
// launch (sampled on macOS 26). The file is written for each launch, so the next process takes any change.
|
|
131
|
+
'config.automatically_reload_config = false',
|
|
132
|
+
// Terminal.app's mouse: a drag, double or triple click selects text in the window and the highlight stays after
|
|
133
|
+
// the button comes up, for Cmd+C to copy. The pane's tmux asks for the mouse (so the wheel scrolls its history);
|
|
134
|
+
// without these the left button went to tmux, whose copy-mode drops the highlight on release.
|
|
135
|
+
'local act = wezterm.action',
|
|
136
|
+
'config.mouse_bindings = {',
|
|
137
|
+
...[[1, 'Cell'], [2, 'Word'], [3, 'Line']].flatMap(([streak, unit]) => [
|
|
138
|
+
` { event = { Down = { streak = ${streak}, button = 'Left' } }, mods = 'NONE', mouse_reporting = true, action = act.SelectTextAtMouseCursor '${unit}' },`,
|
|
139
|
+
` { event = { Drag = { streak = ${streak}, button = 'Left' } }, mods = 'NONE', mouse_reporting = true, action = act.ExtendSelectionToMouseCursor '${unit}' },`,
|
|
140
|
+
` { event = { Up = { streak = ${streak}, button = 'Left' } }, mods = 'NONE', mouse_reporting = true, action = act.CompleteSelection 'PrimarySelection' },`,
|
|
141
|
+
]),
|
|
142
|
+
'}',
|
|
128
143
|
'return config',
|
|
129
144
|
'',
|
|
130
145
|
];
|
|
131
146
|
return lines.join('\n');
|
|
132
147
|
}
|
|
133
148
|
|
|
134
|
-
/** Writes the config for this machine and returns its path. */
|
|
149
|
+
/** Writes the config for this machine, when it differs from the one on disk, and returns its path. */
|
|
135
150
|
export function weztermConfigFile(platform = process.platform) {
|
|
136
151
|
const path = join(tmpdir(), `supercode-wezterm-${process.getuid?.() ?? 'user'}.lua`);
|
|
152
|
+
const config = weztermConfig(terminalAppProfile(platform));
|
|
153
|
+
let current = null;
|
|
154
|
+
try { current = readFileSync(path, 'utf8'); } catch { /* not written yet */ }
|
|
155
|
+
if (current === config) return path;
|
|
137
156
|
const next = `${path}.${process.pid}`;
|
|
138
|
-
writeFileSync(next,
|
|
157
|
+
writeFileSync(next, config);
|
|
139
158
|
renameSync(next, path);
|
|
140
159
|
return path;
|
|
141
160
|
}
|