monitors, brightness, battery widget

This commit is contained in:
Simonas Narbutas
2018-08-02 15:58:24 +02:00
parent fd56f2ca1c
commit 3a64720df4
4 changed files with 40 additions and 10 deletions

View File

@@ -12,4 +12,9 @@ function usage_and_exit {
if [ ${#} -ne 1 ]; then
usage_and_exit
fi
xbacklight -inc ${1}
BRIGHTNESS=$(( $(</sys/class/backlight/intel_backlight/brightness)+${1} ))
if (( $BRIGHTNESS < 7500 )) && (( $BRIGHTNESS > 0 ))
then
echo $BRIGHTNESS > "/sys/class/backlight/intel_backlight/brightness"
fi
echo $(( 100*$BRIGHTNESS/7500 ))