Change Mac Brightness from Command Line

By  on  

Earlier this week I posted about how you can modify your Mac's volume from command line.  Little command line scripts make me smile because I spend so much of my day in command line, and automation can be the key to productivity.  I next thought about modifying brightness from command line and I found out that changing Mac brightness is super easy!s

The first step to changing Mac brightness is installing the brightness utility with Homebrew:

brew install brightness

With brightness installed, you can change the brightness of a Mac from command line:

brightness 0.3

This utility could be used somewhat like ding; you could execute a long-running script and then modify brightness to signify the task has completed:

brightness 0.1 && ./do-long-task && brightness 1

The brightness of a screen is a simple setting but you can make it work for you via automation with brightness!

Recent Features

  • By
    Camera and Video Control with HTML5

    Client-side APIs on mobile and desktop devices are quickly providing the same APIs.  Of course our mobile devices got access to some of these APIs first, but those APIs are slowly making their way to the desktop.  One of those APIs is the getUserMedia API...

  • By
    How I Stopped WordPress Comment Spam

    I love almost every part of being a tech blogger:  learning, preaching, bantering, researching.  The one part about blogging that I absolutely loathe:  dealing with SPAM comments.  For the past two years, my blog has registered 8,000+ SPAM comments per day.  PER DAY.  Bloating my database...

Incredible Demos

  • By
    Event Delegation with MooTools

    Events play a huge role in JavaScript. I can't name one website I've created in the past two years that hasn't used JavaScript event handling on some level. Ask yourself: how often do I inject elements into the DOM and not add an...

  • By
    Redacted Font

    Back when I created client websites, one of the many things that frustrated me was the initial design handoff.  It would always go like this: Work hard to incorporate client's ideas, dream up awesome design. Create said design, using Lorem Ipsum text Send initial design concept to the client...

Discussion

    Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!