Created
April 19, 2013 11:25
-
-
Save henix/5419768 to your computer and use it in GitHub Desktop.
bri: show, set and store the brightness of your laptop (BTW, check the battery)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BRIFILE=/sys/class/backlight/acpi_video0/brightness | |
if [ $# -lt 1 ]; then | |
cat $BRIFILE | |
else | |
echo $1 > $BRIFILE | |
echo $1 > /root/.bri | |
fi | |
if acpi -b | grep -q Discharging ; then | |
echo the battery is discharging!!! | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment