--- /dev/null
+all:
+ @echo "Call \"make install\" to install this program."
+ @echo "Call \"make hotplug\" to install matching hotplug events."
+
+INSTALL_PATH=/usr/local/bin
+install:
+ install auto-disper ${INSTALL_PATH}
+ install -m 755 autorandr ${INSTALL_PATH}
+ install -m 644 bash_completion/autorandr /etc/bash_completion.d/
+
+hotplug:
+ install -m 755 pm-utils/40autorandr /etc/pm/sleep.d/
+ install -m 644 udev/40-monitor-hotplug.rules /etc/udev/rules.d/
+ udevadm control --reload-rules
\ No newline at end of file
controlling nvidia chipsets. The formats for fingerprinting the current setup
and saving/loading the current configuration are adjusted accordingly.
+To install autorandr call "make install", define your setup and then call
+"make hotplug" to install hotplug scripts.
+
#!/bin/sh
#
# 40autorandr: Change autorandr profile on thaw/resume
+exec > /var/log/autorandr.log 2>&1
AUTORANDR="autorandr -c"
{
for X in /tmp/.X11-unix/X*; do
D="${X##/tmp/.X11-unix/X}"
- user=$(who | awk -vD="$D" '$5 ~ "\\(:"D"\\)$" {print $1}')
+ user=$(w -h | awk -vD="$D" '$3 ~ ":"D"(\\.[0-9])?$" {print $1}' | head -1)
+ logger "autorandr: Changing display configuration for user '$user'"
if [ x"$user" != x"" ]; then
export DISPLAY=":$D"
/bin/su -c "${AUTORANDR}" "$user"
--- /dev/null
+ACTION=="change", SUBSYSTEM=="drm", RUN+="/etc/pm/sleep.d/40autorandr thaw"