mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-06-29 04:50:01 +02:00
polybar: fix monitor detection on clone
Polybar knows how to do that, let's just use polybar --list-monitors.
This commit is contained in:
parent
08e33d4d39
commit
62a831ac40
1 changed files with 2 additions and 2 deletions
|
@ -3,8 +3,8 @@
|
|||
export DPI=$(xrdb -query | sed -nE 's/^Xft\.dpi:\s*//p')
|
||||
export HEIGHT=$((18 * DPI / 96))
|
||||
|
||||
MONITORS=$(xrandr --current --listactivemonitors | sed -nE 's/ *([0-9]+): [+*]*([^ ]*).*/\2/p')
|
||||
PRIMARY=$(xrandr --current --listactivemonitors | sed -nE 's/ *([0-9]+): [+]?[*]([^ ]*).*/\2/p')
|
||||
MONITORS=$(polybar --list-monitors | sed -nE 's/([^ ]+): .*/\1/p')
|
||||
PRIMARY=$(polybar --list-monitors | grep -F '(primary)' | sed -nE 's/([^ ]+): .*/\1/p')
|
||||
PRIMARY=${PRIMARY:-${MONITORS%% *}}
|
||||
|
||||
awk 'BEGIN { i=0 } ($4 == "/" && $3 !~ /^0:/) {print "mount-"i" = "$5; i++}' /proc/self/mountinfo \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue