Update monitor setup and switching

This commit is contained in:
LordMathis
2019-02-05 20:31:53 +01:00
parent d097818be3
commit 4fc2bcab0a
5 changed files with 51 additions and 15 deletions

View File

@@ -7,4 +7,14 @@ killall -q polybar
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
# Launch polybar
polybar default &
intern=eDP-1
extern=HDMI-1
if xrandr | grep "$extern disconnected"; then
m=$intern
else
m=$extern
fi
MONITOR=$m polybar default &