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.util.Optional Class Deep Dive Tutorial - Java
- Get the total size and number of objects of a AWS S3 bucket and folders - AWS
- Bash How to Save Output of a Command to a Variable - Bash
- Stop android adb service from command prompt or terminal - Android
- How to fix Java nio NoSuchFileException wile reading a file - Java
- How to Turn on Light/Dark Mode on Xcode IDE - MacOS
- How to know the Size of an Object in Python - Python
- 16: Find the largest element in a List - 1000+ Python Programs - Python-Programs