Skip to content
Permalink
Browse files

Fixed unavailable dark mode on Linux

  • Loading branch information...
eko committed Aug 9, 2019
1 parent a6f3409 commit 1217a29f22f0d523b04bfb223651012a8d48c039
Showing with 4 additions and 2 deletions.
  1. +4 −2 main.js
@@ -11,7 +11,7 @@ app.dock.hide()

app.on('ready', () => {
global.sharedObject = {
isDarkMode: systemPreferences.isDarkMode()
isDarkMode: 'darwin' == process.platform ? systemPreferences.isDarkMode() : false
}

const envVars = shellEnv.sync()
@@ -48,7 +48,9 @@ const themeHasChanged = () => {
updateDarkMode()
}

systemPreferences.subscribeNotification('AppleInterfaceThemeChangedNotification', themeHasChanged)
if ('darwin' == process.platform) {
systemPreferences.subscribeNotification('AppleInterfaceThemeChangedNotification', themeHasChanged)
}

app.on('window-all-closed', () => {
app.quit()

0 comments on commit 1217a29

Please sign in to comment.
You can’t perform that action at this time.