From 385360b51614c4f200fe11788bdc2eddbb5fee1d Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Wed, 20 Oct 2021 15:29:23 +0200 Subject: [PATCH] Revert "polybar: switch back to xrandr to find monitors" This reverts commit 41dba59ce26af9443d4c20090e64c2de745e26b5. It's fixed now. --- bin/polybar | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/polybar b/bin/polybar index e86416b..409677c 100755 --- a/bin/polybar +++ b/bin/polybar @@ -7,8 +7,8 @@ export HEIGHT=$((18 * DPI / 96)) # xrandr --setmonitor '*'DisplayPort-3-left 1920/444x1440/334+0+0 DisplayPort-3 # xrandr --setmonitor DisplayPort-3-right 1520/352x1440/334+1920+0 none -MONITORS=$(xrandr --current --listactivemonitors | sed -nE 's/ *([0-9]+): [+*]*([^ ]*).*/\2/p' | tr '\n' ' ') -PRIMARY=$(xrandr --current --listactivemonitors | sed -nE 's/ *([0-9]+): [+]?[*]([^ ]*).*/\2/p') +MONITORS=$(polybar --list-monitors | sed -nE 's/([^ ]+): .*/\1/p' | tr '\n' ' ') +PRIMARY=$(polybar --list-monitors | grep -F '(primary)' | sed -nE 's/([^ ]+): .*/\1/p') NMONITORS=$(echo $MONITORS | wc -w) PRIMARY=${PRIMARY:-${MONITORS%% *}}