Clean up monitor-setup
Signed-off-by: Severin Kaderli <severin@kaderli.dev>
This commit is contained in:
parent
7f0114dae6
commit
5f170c2db6
2 changed files with 9 additions and 7 deletions
|
@ -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
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue