mirror of
https://github.com/davidkaya/aryx.git
synced 2026-08-06 19:58:43 +02:00
feat: add system tray with quick actions and minimize-to-tray
System tray: - Always-visible tray icon with context menu - Quick Scratchpad action from tray (triggers session creation via IPC bridge to renderer) - Running session count in tray tooltip and menu - Click tray icon to show/focus window - Quit option in tray menu Minimize to tray: - New 'Minimize to tray on close' toggle in Settings > Appearance - When enabled, closing the window hides to tray instead of quitting (configurable per-user, default off) - macOS: hides dock icon when minimized to tray - Proper force-quit handling (Cmd+Q on macOS, tray Quit) Full IPC contract chain: - minimizeToTray setting in WorkspaceSettings - setMinimizeToTray channel + ElectronApi method - Preload bridge, service handler, IPC registration - Preserved through workspace normalization Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -27,6 +27,7 @@ const api: ElectronApi = {
|
||||
setTheme: (theme) => ipcRenderer.invoke(ipcChannels.setTheme, theme),
|
||||
setTerminalHeight: (input) => ipcRenderer.invoke(ipcChannels.setTerminalHeight, input),
|
||||
setNotificationsEnabled: (enabled) => ipcRenderer.invoke(ipcChannels.setNotificationsEnabled, enabled),
|
||||
setMinimizeToTray: (enabled) => ipcRenderer.invoke(ipcChannels.setMinimizeToTray, enabled),
|
||||
saveMcpServer: (input) => ipcRenderer.invoke(ipcChannels.saveMcpServer, input),
|
||||
deleteMcpServer: (serverId) => ipcRenderer.invoke(ipcChannels.deleteMcpServer, serverId),
|
||||
saveLspProfile: (input) => ipcRenderer.invoke(ipcChannels.saveLspProfile, input),
|
||||
@@ -95,6 +96,12 @@ const api: ElectronApi = {
|
||||
ipcRenderer.on(ipcChannels.sessionEvent, handler);
|
||||
return () => ipcRenderer.off(ipcChannels.sessionEvent, handler);
|
||||
},
|
||||
onTrayCreateScratchpad: (listener) => {
|
||||
const handler = () => listener();
|
||||
|
||||
ipcRenderer.on(ipcChannels.trayCreateScratchpad, handler);
|
||||
return () => ipcRenderer.off(ipcChannels.trayCreateScratchpad, handler);
|
||||
},
|
||||
};
|
||||
|
||||
contextBridge.exposeInMainWorld('aryxApi', api);
|
||||
|
||||
Reference in New Issue
Block a user