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

Don't trigger any switches if there is only one URL in the list #31

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tomuta
Copy link

@tomuta tomuta commented Aug 20, 2024

This prevents some sites (e.g. HomeAssistant dashboards) from reloading or refreshing repeatedly.

This prevents some sites (e.g. HomeAssistant dashboards) from reloading
or refreshing repeatedly.
@tomuta
Copy link
Author

tomuta commented Aug 20, 2024

First of all, thank you for this awesome project! I used it to set up a HASS dashboard on my Rpi. To do this, I deleted all URLs and just added the one URL to the dashboard.

However, I've encountered a rather interesting problem: Every 2 minutes or so (subjective estimate, I didn't time it) the HASS dashboard disconnects and reloads. I could not replicate this on any other system. It took me quite a bit of time until I realized that this is somehow triggered by the switcher.sh script, sending some key strokes to Chromium. This change makes switcher.sh do nothing if there is only one URL in the list.

@debloper debloper added bug Something isn't working enhancement New feature or request labels Aug 26, 2024
@debloper debloper added this to the .NEXT milestone Aug 26, 2024
@debloper
Copy link
Owner

If there's only 1 URL, then every 100s (10 cycles) it'll try to reload, so your report checks out.

I can understand that it may be inconvenient in your case, where the page doesn't need explicit reloading, but for now, this is the intended behavior. We will need to add some advanced control to the dashboard to disable switching and reloading as a long term fix; but given your particular situation, there's a simple fix:

  • open <user-home-directory>/.config/wayfire.ini with an editor (nano, vim etc)
  • delete the line that says switcher = bash <user-home-directory>/piosk/scripts/switcher.sh
  • save the file, and reboot the RPi

If you update/reinstall the setup, you may have to do this again.

I've put this on the roadmap for the next version. Thanks for finding/reporting it.

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

Successfully merging this pull request may close these issues.

2 participants