Giter Club home page Giter Club logo

mac-like-automatic-brightness's Introduction

A fork of steel99xl's Mac-like-automatic-brightness script for use with the 13 inch AMD Framework.

Systemd

Ensure the script can be executed: chmod +x AutomaticBrightness.sh

Create a simple unit file: $HOME/.config/systemd/user/autobrightness.service

With the contents:

[Unit]
Description=Mac like automatic brightness service

[Service]
ExecStart=/path/to/AutomaticBrightness.sh

[Install]
WantedBy=default.target

And then start it systemctl --user enable --now autobrightness

Mac-like-automatic-brightness

A simple script to provide a "Mac" like automatic brightness adjustemnt/ animation

made for the FrameWork laptop

based on 2017 MacBook Pro

read Configuration for detailed informatoion about what options you have to easily customize/ adjust the bightness or animation speed

Requires

brightnessctl

Non 12th Gen Intel Framework Owners

Your sensor has a diffrent range thant the 12th Gen Intel Framework laptop sensors, please see chart bellow

       Type     |  Sensor Rnge | STDScale
 11th Gen Intel | 0 - 3207633  | 1
 12th Gen Intel | 0 - 3984     | 24

Controls

./AutomaticBrightness.sh | Defualt running mode of script

./AutomaticBrightness.sh -i [NUMBER] | Increase the offset your brightness sensors raw reading

./AutomaticBrightness.sh -d [NUMBER] | Decrease the offset your brightness sensors raw reading

/tmp/AB.offset | Stores current offset for the sensor

/tmp/AB.stop | Stops AutomaticBrightness.sh

/tmp/AB.start | Starts stopped AutomaticBrightness.sh

/tmp/AB.kill | Kills AutomaticBrightness.sh

when running you will see a AB.running file and AB.offset in /tmp

Configuring

Light Change The percent of light change needed to be seen by the sensor for it to change the screen brightness

SensorDelay Time in seconds the script will wait to check the sensor for a luminess change after the animation (LevelSteps * AnimationDelay)

SensorToDisplayScale The ratio from sensor to screen brighness, recommended minimum 24 for 12th gen framework laptops. Increasing the value will give a brighter screen for the amount of light in the room/ enviroment

LevelSteps Sets amount of brightness steps, recomended to match refeshrate

AnimationDelay Speed of the brightness animation(delay between each step), recomended screen refreshrate in seconds

MaxScreenBrightness The highest value your screen supports, check /sys/class/backlight/intel_backlight/max_brightness on framework laptops

MinimunBrightness The minimum screen brightness, recomended minumim 001 so the backlight dosn't turn off

~~ Other things to note

Light The file where your lightsensor has its current value

CurrentBirghtness The file where your screen stores its current brightness

mac-like-automatic-brightness's People

Contributors

steel99xl avatar wagensveld avatar

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.