diff options
Diffstat (limited to 'config/polybar/launch.sh')
-rwxr-xr-x | config/polybar/launch.sh | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/config/polybar/launch.sh b/config/polybar/launch.sh index 01e4b17..33b6531 100755 --- a/config/polybar/launch.sh +++ b/config/polybar/launch.sh @@ -11,14 +11,11 @@ while pgrep -u $UID -x polybar >/dev/null; do sleep 0.1; done #MONITOR=DP-0 polybar --reload wsonly & -export MONITOR=DP-1 -polybar wsonly & - -export MONITOR=DP-2 -polybar wsonly & - -export MONITOR=HDMI-1 -polybar wsonly & - -export MONITOR=DP-3 -polybar ws & +polybar -m | while read -r mon; do + export MONITOR=$(echo $mon | cut -d: -f1) + echo $mon | grep -q "(primary)" && { + polybar ws & + } || { + polybar wsonly & + } +done |