Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade
In this article, we will explore how to enable Dark Mode on macOS, a feature that enhances the visual experience by reducing eye strain and saving battery life on devices with OLED screens. Dark Mode is particularly useful for users who work in low-light environments or prefer a darker interface. This guide will cover the steps to enable Dark Mode through the System Preferences and via command line for advanced users.
Examples:
Open System Preferences:
Navigate to General Settings:
Select Dark Mode:
For users who prefer using the Terminal, Dark Mode can also be enabled via command line:
Open Terminal:
Enter the Command:
osascript -e 'tell application "System Events" to tell appearance preferences to set dark mode to true'
osascript -e 'tell application "System Events" to tell appearance preferences to set dark mode to false'
Verify the Change:
For users who want to automate the switching between Dark and Light Mode, you can create a simple shell script:
Create the Script:
nano toggle_dark_mode.sh
Add the Script Content:
#!/bin/bash
current_mode=$(osascript -e 'tell application "System Events" to tell appearance preferences to get dark mode')
if [ "$current_mode" = "true" ]; then
osascript -e 'tell application "System Events" to tell appearance preferences to set dark mode to false'
else
osascript -e 'tell application "System Events" to tell appearance preferences to set dark mode to true'
fi
Save and Exit:
Ctrl + X
, then Y
, and Enter
.Make the Script Executable:
chmod +x toggle_dark_mode.sh
Run the Script:
./toggle_dark_mode.sh