Jas-SinghFSU/HyprPanel

Hypridle module not working

Opened this issue · 5 comments

Describe the bug
The hypridle module switches from the disabled state to the enabled state with no manual interaction.

To Reproduce

  1. Click on hypridle module to switch from enabled to disabled (in order to disable screen locking).
  2. Continue to interact with machine as usual
  3. In roughly 1 minute, the state and icon will switch back to the enabled state.

Expected behavior
I expect that hypridle will be toggled correctly and the bar module correctly reflects the current activation state

Screenshots
N/A, no relevant console output was seen when triggering bug from hyprpanel launched from ternminal

Desktop (please complete the following information):

  • Distribution: NixOS 24.11
  • Window Manager/Desktop Environment: Hyprland

Additional context

Here's my hypridle config

{ config, lib, pkgs, ... }: {
  # Enable hypridle
  services.hypridle = {
    enable = true;
    settings = {
      listener = [
        # warning before screen lock
        {
          timeout = 240;
          on-timeout =
            "notify-send -u critical 'Screen Will Lock' 'One minute remaining'";
        }
        # will lock screen
        {
          timeout = 300;
          on-timeout = "hyprlock";
        }
        # will enter hibernation
        {
          timeout = 600;
          on-timeout = "hyprctl dispatch dpms off";
          on-resume = "hyprctl dispatch dpms on";
        }
      ];
    };
  };
}

The panel should not be switching off your hypridle unless there is a click event. It simply checks if there is an active instance of hypridle running adn reports that as the status.

Does it auto-enable only with Hyprpanel running?

The panel should not be switching off your hypridle unless there is a click event.

That's what's happening, unless I'm misunderstanding you?

My interpretation of the module was that since the button accepts a click, and the tooltip/icon change from enabled to disabled, that it is actively toggling the state of the service. This is how the Notifications button toggle functions.

You're saying that clicking the hypridle custom module does not actually enable/disable the service?

My use case is that, say, I want to set my computer down to monitor a webpage without touching it. I want a "kiosk" mode, so my screen doesn't lock. Would I not be able to do that by toggling the button/module to disabled?

That is what should happen currently. If you disable it, unless there is a configuration or a script running for you that enables it back automatically, it should remain disabled.

In that, if you click the hypridle button to disable it, it will stay disabled until you click again to enable. HyprPanel doesn't have any logic to re-enable hypridle.

In that, if you click the hypridle button to disable it, it will stay disabled until you click again to enable. HyprPanel doesn't have any logic to re-enable hypridle.

Ok great, this is the behavior I expected as well. I use home-manager on NixOS to run hypridle, so maybe the issue lies somewhere in the module? Maybe Restart = "always"; is the culprit... But it seems like Hyprland + Hyprpanel + Hypridle on NixOS + Home-Manager is an increasingly common configuration? Seems like it would have been noticed already.