Code Monkey home page Code Monkey logo

nobacklight's Introduction

No automatic backlight, please!

Rationale

If an external display is in use in mirror mode, even if automatic brightness adjustment is set to off, when you close the lid and open it again, internal display's brightness is automatically set to a non-zero value. This is extremely annoying and there's no option to turn internal display off completely when using external one.

External display

Less fuss

Imagine a magic script that monitors your lid state, and when lid is open, it dims internal display.

Here it is!

Installation

Put the executable file nobacklight to ~/.bin directory. Then put nobacklight.plist to ~/Library/LaunchAgents. So this is basically the installation script:

brew install brightness
git clone --depth 1 https://github.com/pirj/nobacklight
cd nobacklight
mkdir -p ~/.bin
cp nobacklight ~/.bin
cp nobacklight.plist ~/Library/LaunchAgents
launchctl load ~/Library/LaunchAgents/nobacklight.plist

How does this work

It periodically checks if lid is open. Nothing fancy, it uses command line tools that come with OSX, specifically ioreg and brightness from homebrew.

Blah

Author: Phil Pirozhkov

License: MIT

nobacklight's People

Contributors

pirj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nobacklight's Issues

Not working with Ventura?

HI, I have installed it, but it's not working. After opening the lid there is always the not fully dimmed Display visable (as with no nobacklight installed). Mac OS is Vebtura 13.3.1 (a) (22E772610a). The machine is a MacBook Pro M1 2020 with external Benq Monitor and 'noclamshell' installed, which works perfectly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.