Skip to content

Instantly share code, notes, and snippets.

@jbaranski
Last active September 29, 2024 19:40
Show Gist options
  • Save jbaranski/431789a714a3bff754735bbe717a3d73 to your computer and use it in GitHub Desktop.
Save jbaranski/431789a714a3bff754735bbe717a3d73 to your computer and use it in GitHub Desktop.
MacBook increase display brightness on the command line
# Increase display brightness command
osascript -e 'tell application "System Events"' -e 'key code 144' -e ' end tell'
# Decrease display brightness command
osascript -e 'tell application "System Events"' -e 'key code 145' -e ' end tell'
# zsh solution to turn it all the way up on one command, just run `b` on the cmd line
alias bright="osascript -e 'tell application \"System Events\"' -e 'key code 144' -e ' end tell'"
alias b="repeat 10 { bright }"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment