Revert "polybar: fix monitor detection on clone"

This reverts commit 62a831ac40.
This commit is contained in:
Vincent Bernat 2021-08-16 17:47:03 +02:00
parent e730a3aa72
commit a5c608eff8

View file

@ -3,8 +3,8 @@
export DPI=$(xrdb -query | sed -nE 's/^Xft\.dpi:\s*//p')
export HEIGHT=$((18 * DPI / 96))
MONITORS=$(polybar --list-monitors | sed -nE 's/([^ ]+): .*/\1/p')
PRIMARY=$(polybar --list-monitors | grep -F '(primary)' | sed -nE 's/([^ ]+): .*/\1/p')
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 \