feat: add miniplayer keyboard shortcuts and fix X button behavior

Add Shift+M toggle shortcut for mini player mode (main and mini window).
Add 1-5 number keys for surface switching (micro/compact/artwork/queue/lyrics)
in mini player context. Add playback shortcuts (Space, Ctrl+Arrow) to mini
player window. Fix X button to close app (or hide to tray) instead of
duplicating the Expand button behavior. Closes #134.
This commit is contained in:
vicrodh committed 2026-03-01 14:04:18 -06:00
1 parent 0f1f6b3716
commit 976e5226b4
8 files changed
+167 -17

No files matched your search

+18
View File
@@ -194,3 +194,21 @@ export async function setMiniplayerAlwaysOnTop(alwaysOnTop: boolean): Promise<Al
export async function closeMiniplayerWindow(): Promise<void> {
await exitMiniplayerMode();
}
/**
* Close the app from the mini player.
*
* Triggers the main window's close handler which either:
* - Hides all windows to tray (if close-to-tray is enabled)
* - Quits the app (if close-to-tray is disabled)
*/
export async function closeAppFromMiniplayer(): Promise<void> {
try {
const mainWindow = await Window.getByLabel(MAIN_WINDOW_LABEL);
if (mainWindow) {
await mainWindow.close();
}
} catch (err) {
console.error('[MiniPlayer] Failed to close app:', err);
}
}