From 5a71ea3e28bbd72ed972d9beab8b19a5040cb8c3 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Tue, 17 Aug 2021 11:52:20 +0200 Subject: [PATCH] Revert "polybar: don't try compatibility with RandR 1.5" This reverts commit 25a147b97ffdd0de7df5bf724269a2b4f03391bc. --- bin/polybar | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/polybar b/bin/polybar index 2d918fc..8fc1b97 100755 --- a/bin/polybar +++ b/bin/polybar @@ -3,8 +3,8 @@ export DPI=$(xrdb -query | sed -nE 's/^Xft\.dpi:\s*//p') export HEIGHT=$((18 * DPI / 96)) -MONITORS=$(xrandr --current | awk '($0 ~ / connected / && $0 ~ / [0-9]+x[0-9]+\+/) {print $1}' | tr '\n' ' ') -PRIMARY=$(xrandr --current | awk '($0 ~ / connected primary / && $0 ~ / [0-9]+x[0-9]+\+/) {print $1; exit}') +MONITORS=$(xrandr --current --listactivemonitors | sed -nE 's/ *([0-9]+): [+*]*([^ ]*).*/\2/p' | tr '\n' ' ') +PRIMARY=$(xrandr --current --listactivemonitors | sed -nE 's/ *([0-9]+): [+]?[*]([^ ]*).*/\2/p') PRIMARY=${PRIMARY:-${MONITORS%% *}} awk 'BEGIN { i=0 } ($4 == "/" && $3 !~ /^0:/) {print "mount-"i" = "$5; i++}' /proc/self/mountinfo \