https://github.com/pboardman/laplights
Python module used to control the leds and/or backlights on a laptop.
https://github.com/pboardman/laplights
Last synced: 10 months ago
JSON representation
Python module used to control the leds and/or backlights on a laptop.
- Host: GitHub
- URL: https://github.com/pboardman/laplights
- Owner: pboardman
- Created: 2017-08-01T18:15:03.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-01T18:44:24.000Z (almost 9 years ago)
- Last Synced: 2025-03-17T09:15:35.188Z (about 1 year ago)
- Language: Python
- Size: 1000 Bytes
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Laplights
Laplights is a python module used to control the leds and/or backlights on a laptop.
It only has support for the Thinkpad T460 for now but adding your own model is easy.
## How to use
just import laplights like this:
`from laplights import Lights`
then you can do something like:
```python
laptop_lights = Lights("t460")
laptop_lights.set_brightness("screen_backlight", 30)
```
## Adding your laptop model
To add your laptop model just add
```python
elif model == "YOUR_MODEL":
light_info["screen_backlight"] = "PATH_TO_YOUR_SYSCLASS_SCREEN_BACKLIGHT_DIR"
light_info["kb_backlight"] = "PATH_TO_YOUR_SYSCLASS_KEYBOARD_BACKLIGHT_DIR"
light_info["pwr_led"] = "PATH_TO_YOUR_SYSCLASS_PWR_LED_DIR"
#etc... You can add more if you like
```