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:
parent
9aa18d7bd9
commit
14f5a94521
2
Makefile
2
Makefile
|
@ -129,7 +129,7 @@ endif
|
||||||
install_udev:
|
install_udev:
|
||||||
$(if $(UDEV_RULES_DIR),,$(error UDEV_RULES_DIR is not defined))
|
$(if $(UDEV_RULES_DIR),,$(error UDEV_RULES_DIR is not defined))
|
||||||
mkdir -p ${DESTDIR}/${UDEV_RULES_DIR}/
|
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
|
||||||
@echo "To activate the udev rules, run this command as root:"
|
@echo "To activate the udev rules, run this command as root:"
|
||||||
@echo " udevadm control --reload-rules"
|
@echo " udevadm control --reload-rules"
|
||||||
|
|
Loading…
Reference in New Issue