aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Runge <david.runge@frqrec.com>2014-02-20 01:33:53 +0100
committerDavid Runge <david.runge@frqrec.com>2014-02-20 01:33:53 +0100
commitfc8c4b6bca43efac5b36f6ef74258514dd9d5733 (patch)
tree63c019ad6f7f266658afc924e0e25c1930eae7b3
parent9892a5918fe82dd2aa5731b892d9c578cf57fdb4 (diff)
downloaddotfiles-fc8c4b6bca43efac5b36f6ef74258514dd9d5733.tar.gz
dotfiles-fc8c4b6bca43efac5b36f6ef74258514dd9d5733.tar.bz2
dotfiles-fc8c4b6bca43efac5b36f6ef74258514dd9d5733.tar.xz
dotfiles-fc8c4b6bca43efac5b36f6ef74258514dd9d5733.zip
Adding script to set backlight level on Lenovo W540 on startup
-rwxr-xr-xbin/set_backlight12
1 files changed, 12 insertions, 0 deletions
diff --git a/bin/set_backlight b/bin/set_backlight
new file mode 100755
index 0000000..00a6d8f
--- /dev/null
+++ b/bin/set_backlight
@@ -0,0 +1,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