fix : opening link 1
All checks were successful
release / build (push) Successful in 23s
release / verify-windows (push) Successful in 1m13s

This commit is contained in:
jeanotx32
2026-08-12 01:03:23 +02:00
parent 6ad8429cf1
commit a38baf9a88
6 changed files with 109 additions and 19 deletions

View File

@@ -1,6 +1,6 @@
import { execFile } from 'node:child_process';
import { promisify } from 'node:util';
import { resolveXauthority, x11Env } from './x11.ts';
import { resolveXauthority, sessionEnv } from './x11.ts';
const run = promisify(execFile);
@@ -182,7 +182,7 @@ async function findWindow(env: NodeJS.ProcessEnv, match: string): Promise<Visibl
}
function describeNoMatch(match: string, windows: VisibleWindow[]): string {
const display = x11Env().DISPLAY;
const display = sessionEnv().DISPLAY;
if (windows.length === 0) {
return (
@@ -213,7 +213,7 @@ function describeNoMatch(match: string, windows: VisibleWindow[]): string {
}
async function sendLinux(key: string, match: string): Promise<HotkeyResult> {
const env = x11Env();
const env = sessionEnv();
const target = await findWindow(env, match);
await run('xdotool', ['windowactivate', '--sync', target.id], { env, timeout: 5000 });