#!/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