polybar: don't try compatibility with RandR 1.5

The feature is broken. See: https://gitlab.gnome.org/GNOME/gtk/-/issues/2013.
This commit is contained in:
Vincent Bernat 2021-08-16 21:13:00 +02:00
parent 5b1249737c
commit 25a147b97f

View file

@ -3,8 +3,8 @@
export DPI=$(xrdb -query | sed -nE 's/^Xft\.dpi:\s*//p') export DPI=$(xrdb -query | sed -nE 's/^Xft\.dpi:\s*//p')
export HEIGHT=$((18 * DPI / 96)) export HEIGHT=$((18 * DPI / 96))
MONITORS=$(xrandr --current --listactivemonitors | sed -nE 's/ *([0-9]+): [+*]*([^ ]*).*/\2/p' | tr '\n' ' ') MONITORS=$(xrandr --current | awk '($0 ~ / connected / && $0 ~ / [0-9]+x[0-9]+\+/) {print $1}' | tr '\n' ' ')
PRIMARY=$(xrandr --current --listactivemonitors | sed -nE 's/ *([0-9]+): [+]?[*]([^ ]*).*/\2/p') PRIMARY=$(xrandr --current | awk '($0 ~ / connected primary / && $0 ~ / [0-9]+x[0-9]+\+/) {print $1; exit}')
PRIMARY=${PRIMARY:-${MONITORS%% *}} PRIMARY=${PRIMARY:-${MONITORS%% *}}
awk 'BEGIN { i=0 } ($4 == "/" && $3 !~ /^0:/) {print "mount-"i" = "$5; i++}' /proc/self/mountinfo \ awk 'BEGIN { i=0 } ($4 == "/" && $3 !~ /^0:/) {print "mount-"i" = "$5; i++}' /proc/self/mountinfo \