Use add or remove instead of change

Change gets triggered by probably unrelated things like starting a
browser. This should fix
https://github.com/phillipberndt/autorandr/issues/310
This commit is contained in:
DawidJanczak 2022-12-30 17:41:57 +01:00 committed by Phillip Berndt
parent 9aa18d7bd9
commit 14f5a94521
1 changed files with 1 additions and 1 deletions

View File

@ -129,7 +129,7 @@ endif
install_udev:
$(if $(UDEV_RULES_DIR),,$(error UDEV_RULES_DIR is not defined))
mkdir -p ${DESTDIR}/${UDEV_RULES_DIR}/
echo 'ACTION=="change", SUBSYSTEM=="drm", RUN+="$(if $(findstring systemd, $(MAKECMDGOALS)),/bin/systemctl start --no-block autorandr.service,${PREFIX}/bin/autorandr --batch --change --default default)"' > ${DESTDIR}/${UDEV_RULES_DIR}/40-monitor-hotplug.rules
echo 'ACTION=="add|remove", SUBSYSTEM=="drm", RUN+="$(if $(findstring systemd, $(MAKECMDGOALS)),/bin/systemctl start --no-block autorandr.service,${PREFIX}/bin/autorandr --batch --change --default default)"' > ${DESTDIR}/${UDEV_RULES_DIR}/40-monitor-hotplug.rules
@echo
@echo "To activate the udev rules, run this command as root:"
@echo " udevadm control --reload-rules"