aboutsummaryrefslogtreecommitdiffstats
path: root/bin/fix_backlight
blob: 00a6d8f588ad782f69e8c7fed82dcdc0a8390f9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash
# Script to set backlight on startup on Lenovo W540 using
# /sys/class/backlight/intel_backlight/brightness
# This must be run as root.

# check if root
if [[ $EUID -ne 0 ]];then
  echo "This must be run as root."
else
  # set to 234 (around 4th step)
  echo 234 > /sys/class/backlight/intel_backlight/brightness
fi