If you with to turn Dark Mode on/off on your Mac using macOS Terminal command you can do that using dark-mode package.
- Make sure you have brew installed - if not follow the tutorial to install it - link
- Install package dark-mode using command: brew install dark-mode
% brew install dark-mode Running `brew update --preinstall`... ==> Auto-updated Homebrew! Updated Homebrew from 51da118a9 to 374adf7f1. Updated 2 taps (homebrew/core and homebrew/cask). Pouring dark-mode--3.0.2.arm64_monterey.bottle.tar.gz 🍺 /opt/homebrew/Cellar/dark-mode/3.0.2: 5 files, 93KB ==> `brew cleanup` has not been run in the last 30 days, running now...
- To turn on Dark Mode type: dark-mode on in Terminal
- To turn off Dark Mode type: dark-mode off in Terminal
Note: When the first time you run the command using the dark-mode package you will be asked to provide access to System Events.
“Terminal“ wants access to control “System Events“.
Allowing control will provide access to documents and data in “System Events“,
and to perform actions within that app.
Source: https://github.com/sindresorhus/dark-mode
% dark-mode --help
Usage
$ dark-mode [command]
Commands
<none> Toggle dark mode
on Enable dark mode
off Disable dark mode
status Dark mode status
Created by Sindre Sorhus
Facing issues? Have Questions? Post them here! I am happy to answer!
Author Info:
Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.
Follow him on: X
You can also reach out to him via e-mail: rakesh@code2care.org
More Posts related to MacOS,
- How to show line numbers in Nano on Mac
- How to install Jupyter Notebook on macOS Sonoma
- How to Disable Remote Management using Mac Terminal
- Test internet speed using macOS Terminal command
- Docker Desktop needs privileged access macOS
- Google Search Hot Trends Screensaver for Mac OS X
- How to do calculations in Mac Terminal
- How to make TextEdit the default text Editor on Mac
- How to Show Full Website Address on Safari for Mac (Ventura/Sonoma)
- The Zsh Shell - Mac Tutorial
- Opening mac Terminal
- How to change the name of your Mac running on macOS Ventura 13
- How to find the Battery Cycle Count on macOS Ventura
- How to set an emoji as Zsh terminal prompt in macOS
- How to access Trash Folder using Mac Terminal Command
- macOS Ventura XCode Command Line Tools Installation
- Hide Bluetooth icon on Mac Menu Bar macOS Ventura 13
- How to run .sh file in Mac Terminal
- Terminal Command to get the list of available shells in macOS
- How to see Storage Information on macOS Ventura
- How to Go To /usr/local/bin on Mac Terminal?
- How to do screen recording on Mac
- How to Find File and Directory Size in Mac Terminal
- Open .bash_profile File in TextEdit using Terminal
- Remove Now Playing icon from macOS Big Sur Menu Bar
More Posts:
- Java HashMap equivalent in Python using dict data structure - Python
- How to Show File Extensions for Xcode Files - MacOS
- How to hide quick launch in SharePoint classic site - SharePoint
- Where are Notepad++ macros stored? - NotepadPlusPlus
- How to Scan iPhone for Virus? Is Antivirus it really required? - HowTos
- SharePoint Server 2016 IT Preview Deprecated Removed features - SharePoint
- Loading class com.mysql.jdbc.Driver. This is deprecated. The new driver class is com.mysql.cj.jdbc.Driver - Java
- clear is not recognized as an internal or external command operable program or batch file. - DOS