2022-08-11 16:27:58 +03:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
bus-monitor --session "type='signal',interface='org.freedesktop.ScreenSaver'" |
|
|
|
|
while read x; do
|
|
|
|
case "$x" in
|
|
|
|
# Simulate monitor being off
|
2022-12-14 15:17:10 +02:00
|
|
|
*"boolean true"*) xrandr --output HDMI-0 --brightness 0.0;;
|
2022-08-11 16:27:58 +03:00
|
|
|
# Restore monitor brightness
|
2022-12-14 15:17:10 +02:00
|
|
|
*"boolean false"*) xrandr --output HDMI-0 --brightness 1.0;;
|
2022-08-11 16:27:58 +03:00
|
|
|
esac
|
|
|
|
done
|