Skip to content

Instantly share code, notes, and snippets.

@TheAnonymous
Created March 14, 2013 10:38
Show Gist options
  • Save TheAnonymous/5160353 to your computer and use it in GitHub Desktop.
Save TheAnonymous/5160353 to your computer and use it in GitHub Desktop.
This script is for Lenovo T400s (may work on others too...) to set the brightness through the console. Tested on Fedora 18. To get the path for your Laptop this command may helps you find /sys -iname *bright*
#!/bin/bash
ab=`cat /sys/devices/pci0000:00/0000:00:02.0/backlight/acpi_video0/actual_brightness`
mb=`cat /sys/devices/pci0000:00/0000:00:02.0/backlight/acpi_video0/max_brightness`
echo "The max brightness is " $mb " your actual brightness is " $ab " please enter your new brightess:"
read cb
echo $cb > "/sys/devices/pci0000:00/0000:00:02.0/backlight/acpi_video0/brightness"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment