Clean up monitor-setup

Signed-off-by: Severin Kaderli <severin@kaderli.dev>
This commit is contained in:
Severin Kaderli 2019-06-17 20:13:12 +02:00
parent 7f0114dae6
commit 5f170c2db6
Signed by: severinkaderli
GPG key ID: F419F8835B72F0C4
2 changed files with 9 additions and 7 deletions

View file

@ -38,7 +38,9 @@ MONITORS=(
)
for monitor in "${MONITORS[@]}"; do
export POLYBAR_MONITOR="${monitor}"
polybar top &
polybar bottom &
if is-connected "${monitor}"; then
export POLYBAR_MONITOR="${monitor}"
polybar top &
polybar bottom &
fi
done

View file

@ -20,13 +20,13 @@ xrandr --dpi 96
if is-connected "HDMI1"; then
xrandr --output HDMI1 --mode 1280x1024 --left-of eDP1
else
xrandr --output HDMI1 --off
xrandr --output HDMI1 --off > /dev/null 2>&1
fi
if is-connected "HDMI-1-1"; then
xrandr --output HDMI-1-1 --mode 1280x1024 --left-of eDP-1-1
else
xrandr --output HDMI-1-1 --off
xrandr --output HDMI-1-1 --off > /dev/null 2>&1
fi
xrandr --output eDP1 --primary --mode 1920x1080 --pos 1280x0 --rotate normal
@ -35,11 +35,11 @@ xrandr --output eDP-1-1 --primary --mode 1920x1080 --pos 1280x0 --rotate normal
if is-connected "DVI-I-1-1"; then
xrandr --output DVI-I-1-1 --mode 1920x1080 --left-of eDP1
else
xrandr --output DVI-I-1-1 --off
xrandr --output DVI-I-1-1 --off > /dev/null 2>&1
fi
if is-connected "DVI-I-2-1"; then
xrandr --output DVI-I-2-1 --mode 1920x1080 --left-of eDP-1-1
else
xrandr --output DVI-I-2-1 --off
xrandr --output DVI-I-2-1 --off > /dev/null 2>&1
fi