Skip to content

Instantly share code, notes, and snippets.

@feifanzhou
Created March 19, 2017 20:33
Show Gist options
  • Save feifanzhou/0c3287eb9c5b0cb75f4a43c326647c20 to your computer and use it in GitHub Desktop.
Save feifanzhou/0c3287eb9c5b0cb75f4a43c326647c20 to your computer and use it in GitHub Desktop.
Control external screen brightness from Terminal
#!/bin/bash
# Usage: dim <number 0 – 100>
# http://chopmo.dk/2017/01/12/control-monitor-brightness-from-osx.html
cd ~/Developer
git clone https://github.com/kfix/ddcctl.git && cd ddcctl
make install
echo -e "#!/bin/bash\nddcctl -d 1 -b $1 && ddcctl -d 2 -b $1" > /usr/local/bin/dim
chmod +x /usr/local/bin/dim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment