Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions mac
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 17 additions & 0 deletions mac-cli/plugins/general
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down