diff --git a/.config/srandrd.conf b/.config/srandrd.conf new file mode 100644 index 0000000..71d462f --- /dev/null +++ b/.config/srandrd.conf @@ -0,0 +1,8 @@ +#!/bin/bash + + +case "$SRANDRD_ACTION" in + "HDMI1 connected") xrandr --output HDMI1 --auto --right-of eDP1;; + "HDMI1 disconnected") xrandr --output HDMI1 --off;; +esac + diff --git a/.xinitrc b/.xinitrc index a9d9ba8..2cf0a4c 100644 --- a/.xinitrc +++ b/.xinitrc @@ -38,6 +38,13 @@ export SSH_AUTH_SOCK # Automatically lock after 30 minutes using slock xautolock -time 30 -locker i3lock -b -d -c 000000 -e -f +# Thurstybook-specific config: +if [[ "$HOSTNAME" == "thurstybook" ]]; then + # start srandrd + srandrd ~/.config/srandrd.conf +fi + + if [[ "$HOSTNAME" == "dtarch" ]]; then # Set VGA1 to be right of HDMI1 xrandr --output VGA1 --auto --right-of HDMI1