Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

polybar might be detecting monitors too early #9

Open
patrick-motard opened this issue Jul 15, 2019 · 2 comments
Open

polybar might be detecting monitors too early #9

patrick-motard opened this issue Jul 15, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@patrick-motard
Copy link
Owner

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 patrick-motard added the bug Something isn't working label Aug 21, 2019
@patrick-motard
Copy link
Owner Author

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
Copy link
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant