diff --git a/mac b/mac index 95df6b7..99e2a20 100755 --- a/mac +++ b/mac @@ -86,6 +86,9 @@ COMMANDS=( wifi:scan wifi:enable wifi:disable + appearance:dark-mode + appearance:light-mode + appearance:toggle-dark-mode eject-all battery info diff --git a/mac-cli/plugins/general b/mac-cli/plugins/general index 5883c41..ea8a818 100755 --- a/mac-cli/plugins/general +++ b/mac-cli/plugins/general @@ -221,6 +221,23 @@ case "$fn" in networksetup -setairportpower ${_W_DEVICE} off ;; + # Enable Dark Mode + "appearance:dark-mode") + echo "${GREEN}Enabling Dark Mode${NC}" + osascript -e 'tell application "System Events" to tell appearance preferences to set dark mode to true' + ;; + + # Disable Dark Mode + "appearance:light-mode") + echo "${GREEN}Disabling Dark Mode${NC}" + osascript -e 'tell application "System Events" to tell appearance preferences to set dark mode to false' + ;; + + # Toggle Dark Mode + "appearance:toggle-dark-mode") + echo "${GREEN}Toggling Dark Mode${NC}" + osascript -e 'tell application "System Events" to tell appearance preferences to set dark mode to not dark mode' + ;; # Add blank space to the dock "dock:add-space")