Latest Threat ResearchGlassWorm Loader Hits Open VSX via Developer Account Compromise.Details
Socket
Book a DemoInstallSign in
Socket

dark-mode

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dark-mode

Toggle the OS X Dark Mode

Source
npmnpm
Version
2.0.0
Version published
Maintainers
1
Created
Source

node-dark-mode

Toggle the OS X Dark Mode using the dark-mode binary

Requires OS X 10.10 or later.

Ensure System PreferencesGeneralUse dark menu bar and Dock is unchecked.

CLI

$ npm install --global dark-mode
# toggle between dark and light mode
dark-mode

# force a specific mode
dark-mode --mode Dark
dark-mode --mode Light

# get the current mode
dark-mode --mode
> Light

API

$ npm install --save dark-mode
const darkMode = require('dark-mode');

darkMode.toggle().then(() => {
	console.log('toggled between dark and light mode');
});

darkMode.toggle(true).then(() => {
	console.log('forced dark mode');
});

darkMode.toggle(force)

Returns a promise.

force

Type: boolean
Default: null

Force a specific mode, true for dark and false for light.

darkMode.isDark()

Returns a promise for a boolean of whether you're in dark mode.

License

MIT © Sindre Sorhus

Keywords

cli-app

FAQs

Package last updated on 19 Oct 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts