diff --git a/system/.local/bin/polybar-launch b/system/.local/bin/polybar-launch index b8c9064..f6d4745 100755 --- a/system/.local/bin/polybar-launch +++ b/system/.local/bin/polybar-launch @@ -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 \ No newline at end of file diff --git a/system/.local/bin/resolution b/system/.local/bin/resolution index c95e631..49f2158 100755 --- a/system/.local/bin/resolution +++ b/system/.local/bin/resolution @@ -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