feat(config): add configuration window (#70)

This commit is contained in:
2026-05-21 04:16:21 -07:00
committed by GitHub
parent a54f03f0cd
commit dc52bc2fba
287 changed files with 14507 additions and 8134 deletions
+18 -6
View File
@@ -30,6 +30,7 @@ import type {
FrequencyDictionaryMatchMode,
FrequencyDictionaryMode,
NPlusOneMatchMode,
ResolvedSubtitleSidebarConfig,
SecondarySubConfig,
SubtitlePosition,
SubtitleSidebarConfig,
@@ -52,16 +53,21 @@ export interface TexthookerConfig {
}
export type MpvLaunchMode = 'normal' | 'maximized' | 'fullscreen';
export type MpvBackend = 'auto' | 'hyprland' | 'sway' | 'x11' | 'macos' | 'windows';
export interface MpvConfig {
executablePath?: string;
launchMode?: MpvLaunchMode;
socketPath?: string;
backend?: MpvBackend;
autoStartSubMiner?: boolean;
pauseUntilOverlayReady?: boolean;
subminerBinaryPath?: string;
aniskipEnabled?: boolean;
aniskipButtonKey?: string;
}
export type SubsyncMode = 'auto' | 'manual';
export interface SubsyncConfig {
defaultMode?: SubsyncMode;
alass_path?: string;
ffsubsync_path?: string;
ffmpeg_path?: string;
@@ -150,6 +156,13 @@ export interface ResolvedConfig {
mpv: {
executablePath: string;
launchMode: MpvLaunchMode;
socketPath: string;
backend: MpvBackend;
autoStartSubMiner: boolean;
pauseUntilOverlayReady: boolean;
subminerBinaryPath: string;
aniskipEnabled: boolean;
aniskipButtonKey: string;
};
controller: {
enabled: boolean;
@@ -212,10 +225,9 @@ export interface ResolvedConfig {
addMinedWordsImmediately: boolean;
matchMode: NPlusOneMatchMode;
decks: Record<string, string[]>;
color: string;
};
nPlusOne: {
nPlusOne: string;
enabled: boolean;
minSentenceWords: number;
};
behavior: {
@@ -261,7 +273,7 @@ export interface ResolvedConfig {
bandedColors: [string, string, string, string, string];
};
};
subtitleSidebar: Required<SubtitleSidebarConfig>;
subtitleSidebar: ResolvedSubtitleSidebarConfig;
auto_start_overlay: boolean;
jimaku: JimakuConfig & {
apiBaseUrl: string;