better container moving management, handle xrandr at login

This commit is contained in:
2020-09-24 15:33:14 +02:00
parent 069aadd788
commit 3a784764c6
4 changed files with 55 additions and 12 deletions

20
bin/auto-outputs Executable file
View File

@@ -0,0 +1,20 @@
#! /bin/bash
. ~/.config/i3/env
usage() {
echo "usage: auto-outputs"
}
if [ $# -ne 0 ]; then
usage; exit 1
fi
xrandr --auto
if [ -n "${PRIMARY_OUTPUT}" ] && [ -n "${SECONDARY_OUTPUT}" ]; then
if [ -n "${SECONDARY_OUTPUT_POSITION}" ]; then
xrandr --output ${PRIMARY_OUTPUT} --primary --output ${SECONDARY_OUTPUT} ${SECONDARY_OUTPUT_POSITION} HDMI-1
else
xrandr --output ${PRIMARY_OUTPUT} --primary --output ${SECONDARY_OUTPUT} --right-of HDMI-1
fi
fi