Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/harttle/macbook-lighter
Macbook screen and keyboard backlight on the ambient light
https://github.com/harttle/macbook-lighter
archlinux backlight macbook
Last synced: 3 months ago
JSON representation
Macbook screen and keyboard backlight on the ambient light
- Host: GitHub
- URL: https://github.com/harttle/macbook-lighter
- Owner: harttle
- Created: 2019-04-26T07:42:56.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-09-24T14:39:07.000Z (over 3 years ago)
- Last Synced: 2024-10-14T20:43:21.350Z (4 months ago)
- Topics: archlinux, backlight, macbook
- Language: Shell
- Homepage: https://aur.archlinux.org/packages/macbook-lighter
- Size: 17.6 KB
- Stars: 40
- Watchers: 5
- Forks: 13
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mackbook-lighter
MacBook keyboard and screen backlight adjust on the ambient light.
Internally, macbook-lighter reads the following files:* /sys/devices/platform/applesmc.768/light
* /sys/class/backlight/intel_backlight/brightness
* /sys/class/backlight/intel_backlight/max_brightness
* /sys/class/leds/smc::kbd_backlight/brightness
* /sys/class/leds/smc::kbd_backlight/max_brightnessSo you're expected to install corresponding Nvidia/Intel drivers first.
## Setup
All commands including macbook-lighter-kbd, macbook-lighter-screen
will be available with sudo previledge once macbook-lighter finished install.To use in non-root environment such as [xbindkeys](https://wiki.archlinux.org/index.php/Xbindkeys),
it's recommended to setup an "udev" rule to allow users in the
"video" group to set the backlights.
Place a file /etc/udev/rules.d/90-backlight.rules containing:```
SUBSYSTEM=="backlight", ACTION=="add", \
RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness", \
RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"
```And a file /etc/udev/rules.d/91-leds.rules containing:
```
SUBSYSTEM=="leds", ACTION=="add", \
RUN+="/bin/chgrp video /sys/class/leds/%k/brightness", \
RUN+="/bin/chmod g+w /sys/class/leds/%k/brightness"
```## Usage
```bash
# Increase keyboard backlight by 50
macbook-lighter-kbd --inc 50
# Increase screen backlight by 50
macbook-lighter-screen --inc 50
# Set screen backlight to max
macbook-lighter-screen --max
# start auto adjust daemon
systemctl start macbook-lighter
# start auto adjust interactively, root previlege needed
macbook-lighter-ambient
```## Tested MacBook Versions
* MacBook Pro Late 2013 (11,1)
* Macbook Air 2012