fix : opening link 1
This commit is contained in:
@@ -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 });
|
||||
|
||||
Reference in New Issue
Block a user