Skip to content

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.

@pir8radio
Copy link

I would say add an option to each url, ideally a check box, but to make it easy to code you could do something like, if url ends with ?no_refresh that particular URL wont refresh every 10th. This could be handy for things like live camera views, or other pages that self refresh, that if refreshed manually they require a login or something.

@dowermyr
Copy link

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.

Hi! Can´f find the wayfire.ini file that you are reffering to?

@debloper
Copy link
Owner

debloper commented Jun 7, 2025

Hi! Can´f find the wayfire.ini file that you are reffering to?

@dowermyr the repo has been refactored since that comment was posted, and now it's agnostic to Wayland compositor (or desktop managers in general).

Now, in order to disable tab switching, you'll need to run:

systemctl stop piosk-switcher     # to stop temporarily
systemctl disable piosk-switcher  # to keep it disabled across reboots
systemctl mask piosk-switcher     # to remove the service unit altogether (not recommended)

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.

4 participants