patrick-motard / dot

A Golang CLI for my dotfiles DE.
GNU General Public License v3.0
2 stars 1 forks source link

polybar might be detecting monitors too early #9

Open patrick-motard opened 5 years ago

patrick-motard commented 5 years ago

When i logged in this morning, polybar only started on a few monitors. I'm thinking maybe the monitors weren't detected yet? I'll have to test it more. If that is what is happening, maybe I should look into making this a daemon that continuously checks the monitors state and updates polybar if they change.

patrick-motard commented 4 years ago

This occurs every login session. It looks like i3-xrdb-display.sh isn't setting the left monitor (DP-4 in my case). The left monitors bar isn't loading on login. Here is the output in the terminal showing that the monitor isn't set:

 han@h-m-falcon  ~  dot displays -l    
DP-4
 han@h-m-falcon  ~  dot displays -r    
HDMI-0
 han@h-m-falcon  ~  dot displays -p
DVI-D-0
 han@h-m-falcon  ~  xrdb -query  
...omitted...
i3wm*display-left:  
i3wm*display-primary:   DVI-D-0
i3wm*display-right: HDMI-0

i3wm*display-left should be set to DP-4, but it's not set. Perhaps the montior isn't available when the command is run.

patrick-motard commented 4 years ago

When ~/.config/i3/config has the following, the left monitor is set by i3-xrdb-display.sh:

exec_always --no-startup-id dot displays run
exec_always --no-startup-id i3-xrdb-display.sh
exec_always --no-startup-id dot polybar

If you comment out i3-xrdb-display.sh, polybar doesnt load on the left monitor. Running the script shows that $(dot displays -l) always returns nothing.

Digging into dot, and xrandr, I was able to determine that xrandr thinks the left monitor is on the right, and the right monitor is on the left. dot displays run is the command that runs the xrandr script that aligns the monitors. It makes sense that it should be run first. However, I don't understand why i3-xrdb-display.sh needs to be run before dot polybar.