Skip to content

Instantly share code, notes, and snippets.

@jbaranski
Last active September 10, 2023 14:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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