GithubHelp home page GithubHelp logo

backlight's Introduction

backlight

A screen backlight API, CLI and daemon.

backlight.api

Provides a straightforward API to set the brightness of screen backlights for devices available under /sys/class/backlight.

Exceptions

The API provides some exceptions to handle errors that can occur while handling the backlight.

DoesNotExist

Indicates that the provided graphics card does not exist under /sys/class/backlight.

DoesNotSupportAPI

Indicates that the provided graphics card does not implement our API.

NoSupportedGraphicsCards

Indicates that no supported graphics cards could be found in either the provided pool or, if none was supplied, on the system.

Interface

The class backlight.api.Backlight provides an abtracting interface to the backlight API provided under /sys/class/backlight/<graphics_card>.

Backlight(graphics_card)

Creates a new backlight instance using the respective graphics card.
Raises DoesNotExist if the provided graphics card does not exist or DoesNotSupportAPI if the provided graphics card does not support this API.

Backlight.load(graphics_cards=None)

Loads the backlight using the first working graphics card specified in graphics_cards or the first working graphics card found on the system if graphics_cards is None.
If no working graphics cards could be found, it raises NoSupportedGraphicsCards.

Backlight.max

Read-only property to get the maximum raw backlight value.
The default minimum raw backlight value is always 0.

Backlight.raw

Get and sets the raw backlight brightness of the used device as str.
The conditions and constraints of Backlight.value apply accordingly, except that the integer values are represented by base-10 string representations.

Backlight.value

Gets and sets the raw backlight brightness of the used device as int.
The valid values for this property are integers from 0 to Backlight.max including both values and vary between different devices.

Backlight.percent

Gets and sets the raw backlight brightness in percent as int.
The valid values for this property range from 0 to 100 including both.

backlight's People

Contributors

conqp avatar

Watchers

 avatar  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.