dots/stow/.config/matugen/scripts/macos-darkmode.sh

9 lines
315 B
Bash
Executable file

#!/bin/sh
if [ "$1" = "dark" ]; then
osascript -e 'tell application "System Events" to tell appearance preferences to set dark mode to true'
elif [ "$1" = "light" ]; then
osascript -e 'tell application "System Events" to tell appearance preferences to set dark mode to false'
else
echo "$0: [dark|light]"
fi