Closed mountainash closed 3 years ago
if (!tray) { var darkMode = systemPreferences.isDarkMode() tray = new Tray(path.join(__dirname, `/tray-icon-${darkMode ? 'dark' : 'light'}.png`)) tray.on('click', toggleTimer) tray.on('right-click', displayContextMenu) if (interval) clearInterval(interval) interval = setInterval(setCurrentTime, 1000 * 10) setCurrentTime() }
Source: https://github.com/cyon/hakuna-menubar/blob/bb033886705004ef53e301b0697d4d9db0076494/main.js#L57-L64
Updating to Electron v12 in b2e7c1e61a77b5ff19438bedcd1fcc262be9c6cd has cleaned this up magically releasing soon.
Source: https://github.com/cyon/hakuna-menubar/blob/bb033886705004ef53e301b0697d4d9db0076494/main.js#L57-L64