23 lines
569 B
Bash
23 lines
569 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
brightness=$((`xbacklight|cut -f1 -d"."` + 1 ))
|
||
|
echo $brightness
|
||
|
|
||
|
if [ $brightness -lt 10 ]
|
||
|
then
|
||
|
status="notification-display-brightness-off"
|
||
|
elif [ $brightness -lt "30" ]
|
||
|
then
|
||
|
status="notification-display-brightness-low"
|
||
|
elif [ $brightness -lt "60" ]
|
||
|
then
|
||
|
status="notification-display-brightness-medium"
|
||
|
elif [ $brightness -lt "95" ]
|
||
|
then
|
||
|
status="notification-display-brightness-high"
|
||
|
else
|
||
|
status="notification-display-brightness-full"
|
||
|
fi
|
||
|
|
||
|
notify-send " " -i $status -h int:value:$brightness -h string:x-canonical-private-synchronous:brightness
|