@adlk/mojave-isdarkmode 中文文档教程
macOS-isDarkMode
检查 macOS Mojave 暗模式是否启用的简单模块
此模块已准备好在电子中使用。
How to use
安装模块 npm install @adlk/mojave-isdarkmode
。
import isDarkMode from "@adlk/mojave-isdarkmode";
async function config() {
const isDarkModeEnabled = await isDarkModeEnabled();
return {
randomAppConfig: true,
minimizeToSystemTray: false,
isDarkModeEnabled,
};
}
macOS-isDarkMode
Simple module to check if macOS Mojave dark mode is enabled
This module is ready to be used in electron.
How to use
Install the module npm install @adlk/mojave-isdarkmode
.
import isDarkMode from "@adlk/mojave-isdarkmode";
async function config() {
const isDarkModeEnabled = await isDarkModeEnabled();
return {
randomAppConfig: true,
minimizeToSystemTray: false,
isDarkModeEnabled,
};
}