mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-06-23 02:08:35 +02:00
polybar: switch back to xrandr to find monitors
For some reason, I get this with polybar: ``` DisplayPort-3-1: 1920x1440+0+0 (XRandR monitor) DisplayPort-3-2: 1520x1440+1920+0 (XRandR monitor) DisplayPort-3: 3440x1440+0+0 (primary) ```
This commit is contained in:
parent
32501093c1
commit
41dba59ce2
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=$(polybar --list-monitors | sed -nE 's/([^ ]+): .*/\1/p' | tr '\n' ' ')
|
||||
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')
|
||||
NMONITORS=$(echo $MONITORS | wc -w)
|
||||
PRIMARY=${PRIMARY:-${MONITORS%% *}}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue