Ali Hatami Tajik
2 years ago
2 changed files with 13 additions and 0 deletions
@ -0,0 +1 @@ |
|||||
|
SUBSYSTEM=="drm", ENV{MONITOR_LOCK}="/tmp/monitorlock", ENV{SONOLOG}="/tmp/sonolog.log", RUN+="/usr/local/bin/setupmonitor.sh" |
@ -0,0 +1,12 @@ |
|||||
|
#!/bin/bash |
||||
|
# This script will run when drm change event detected. |
||||
|
# This sctipt should be placed in /usr/local/bin |
||||
|
# SONOLOG file must be set beforehand in the udev rule |
||||
|
# MONITOR_LOCK should be set |
||||
|
( |
||||
|
flock -n 100 || exit 1 |
||||
|
sleep 1 # wait until all changes take place |
||||
|
xrandr --auto |
||||
|
python3 /usr/bin/local/python/setupmonitor.py |
||||
|
echo $(data) - INFO - Setup Monitor Done >> $SONOLOG |
||||
|
) 100> $MONITOR_LOCK |
Loading…
Reference in new issue