Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- PATH2BRNS="/proc/acpi/video/VGA1/LCDD/brightness"
- MAX_BRN_LEVEL=`cat $PATH2BRNS | head -n 1 | awk '{print $NF}'`
- MIN_BRN_LEVEL=`cat $PATH2BRNS | head -n 1 | awk '{print $2}'`
- CUR_BRN_LEVEL=`cat $PATH2BRNS | tail -n 1 | awk '{print $2}'`
- PERCENTAGE=`echo "$CUR_BRN_LEVEL/($MAX_BRN_LEVEL-$MIN_BRN_LEVEL)*100" | bc -l | awk -F"." '{print $1}'`
- /usr/local/bin/osd_client $PERCENTAGE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement