refactor(core): normalize service naming across app runtime

This commit is contained in:
2026-02-17 19:00:27 -08:00
parent e38a1c945e
commit 1233e3630f
87 changed files with 2813 additions and 1636 deletions

View File

@@ -136,7 +136,9 @@ export class HyprlandWindowTracker extends BaseWindowTracker {
}
if (
commandLine.includes(`--input-ipc-server=${this.targetMpvSocketPath}`) ||
commandLine.includes(
`--input-ipc-server=${this.targetMpvSocketPath}`,
) ||
commandLine.includes(`--input-ipc-server ${this.targetMpvSocketPath}`)
) {
return mpvWindow;

View File

@@ -69,17 +69,11 @@ export function createWindowTracker(
targetMpvSocketPath?.trim() || undefined,
);
case "sway":
return new SwayWindowTracker(
targetMpvSocketPath?.trim() || undefined,
);
return new SwayWindowTracker(targetMpvSocketPath?.trim() || undefined);
case "x11":
return new X11WindowTracker(
targetMpvSocketPath?.trim() || undefined,
);
return new X11WindowTracker(targetMpvSocketPath?.trim() || undefined);
case "macos":
return new MacOSWindowTracker(
targetMpvSocketPath?.trim() || undefined,
);
return new MacOSWindowTracker(targetMpvSocketPath?.trim() || undefined);
default:
log.warn("No supported compositor detected. Window tracking disabled.");
return null;

View File

@@ -83,9 +83,10 @@ export class SwayWindowTracker extends BaseWindowTracker {
return windows[0] || null;
}
return windows.find((candidate) =>
this.isWindowForTargetSocket(candidate),
) || null;
return (
windows.find((candidate) => this.isWindowForTargetSocket(candidate)) ||
null
);
}
private isWindowForTargetSocket(node: SwayNode): boolean {