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:
8 files changed
+167
-17
No files matched your search
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user