From 011d56d79d42217072649bd26198d2b7052f81a7 Mon Sep 17 00:00:00 2001 From: Vasudev Kamath Date: Mon, 12 Oct 2015 20:48:41 +0530 Subject: Script to change brightness of laptop screen Works on my laptop which uses intel card for display --- brightness-control | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 brightness-control diff --git a/brightness-control b/brightness-control new file mode 100755 index 0000000..ebc0f1b --- /dev/null +++ b/brightness-control @@ -0,0 +1,13 @@ +#!/bin/sh + +if [ $(id -u) -ne 0 ]; then + echo "Please use this with root privileges" + exit 2 +fi + +if [ $# -ne 1 ]; then + echo "Usage $0: brightness" + exit 2 +fi + +su -c "echo $1 > /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight/brightness" -- cgit v1.2.3