Revert "polybar: don't try compatibility with RandR 1.5"

This reverts commit 25a147b97f.
This commit is contained in:
Vincent Bernat 2021-08-17 11:52:20 +02:00
parent 9d9b02fef4
commit 5a71ea3e28

View file

@ -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 \