#!/bin/bash

if [ $# -ne 1 ]; 
    then echo "Give exactly one argument, for example: high, low, med or a value between 0 and 852"
    exit
fi

V=$1

if [ $1 == "high" ]; then V=852 ; fi
if [ $1 == "med" ]; then V=450 ; fi
if [ $1 == "low" ]; then V=250 ; fi

echo "Setting brightness to ${V}"
sudo bash -c "echo ${V} > /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight/brightness"
