mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-02-28 18:22:42 -08:00
refactor(core): normalize service naming across app runtime
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user