balena-io-experimental / browser

A drop-in web browser block
96 stars 70 forks source link

Add ability to adjust the sleep timeout for xrand rotation #171

Open shaunmulligan opened 1 month ago

shaunmulligan commented 1 month ago

Currently there is a hardcoded 3 second sleep timer before trying to apply the screen rotation with xrand. In some case this might be too long or too short. We should make it configurable via ENV var at this line: https://github.com/balena-io-experimental/browser/blob/master/src/startx.sh#L41

An ideal solution would be to not have any sleep, but rather validate that all the hardware and screen are ready before running xrandr. However, I'm not sure how to do that validation.