add udev_brightness script

This commit is contained in:
Václav Uruba 2021-04-30 13:22:27 +02:00
parent 77f6148ca1
commit 6793200098
Signed by: uruba
GPG Key ID: 9D8E987C4B2E1E9C

View File

@ -0,0 +1,9 @@
#!/bin/sh
user=$(users | cut -d" " -f1)
export XAUTHORITY=/home/$user/.Xauthority
export DISPLAY=:0
export brightness=$(light)
echo $brightness
su $user -c 'notify-send "$brightness" -h int:value:$brightness -h string:x-canonical-private-synchronous:brightness'