获取系统首选项
const {systemPreferences} = require('electron')
console.log(systemPreferences.isDarkMode())事件列表
事件: 'accent-color-changed' Windows
事件: 'color-changed' Windows
事件: 'inverted-color-scheme-changed' Windows
方法列表
systemPreferences.isDarkMode() macOS
systemPreferences.isDarkMode() macOSsystemPreferences.isSwipeTrackingFromScrollEventsEnabled() macOS
systemPreferences.isSwipeTrackingFromScrollEventsEnabled() macOSsystemPreferences.postNotification(event, userInfo) macOS
systemPreferences.postNotification(event, userInfo) macOSsystemPreferences.postLocalNotification(event, userInfo) macOS
systemPreferences.postLocalNotification(event, userInfo) macOSsystemPreferences.subscribeNotification(event, callback) macOS
systemPreferences.subscribeNotification(event, callback) macOSsystemPreferences.unsubscribeNotification(id) macOS
systemPreferences.unsubscribeNotification(id) macOSsystemPreferences.subscribeLocalNotification(event, callback) macOS
systemPreferences.subscribeLocalNotification(event, callback) macOSsystemPreferences.unsubscribeLocalNotification(id) macOS
systemPreferences.unsubscribeLocalNotification(id) macOSsystemPreferences.getUserDefault(key, type) macOS
systemPreferences.getUserDefault(key, type) macOSsystemPreferences.setUserDefault(key, type, value) macOS
systemPreferences.setUserDefault(key, type, value) macOSsystemPreferences.isAeroGlassEnabled() Windows
systemPreferences.isAeroGlassEnabled() WindowssystemPreferences.getAccentColor() Windows
systemPreferences.getAccentColor() WindowssystemPreferences.getColor(color) Windows
systemPreferences.getColor(color) WindowssystemPreferences.isInvertedColorScheme() Windows
systemPreferences.isInvertedColorScheme() WindowsLast updated