Skip to content

Feature request: menu to enable caffeine for a set duration (15m/30m/1h/indefinite) #6

Description

@AuthenticSm1les

Feature request

Currently the applet only supports an on/off toggle that inhibits idle indefinitely. It would be great to have a duration menu so caffeine mode can be enabled for a fixed amount of time and then automatically turn itself off.

Proposed UI

Clicking the applet icon opens a small menu with duration options:

  • 15 minutes
  • 30 minutes
  • 1 hour
  • Indefinitely (current behavior)

Selecting a timed option starts the systemd-inhibit lock as usual, plus a timer. When the timer elapses, the inhibitor is released automatically and the applet icon reverts to its inactive state. Selecting the option again (or picking a new duration) while one is already running should cancel/reset the timer.

Why

An indefinite-only toggle means users have to remember to manually disable it, which defeats part of the convenience of a menu applet — a bounded "keep awake for a while" mode is a common use case (e.g. during a presentation or a download) without the risk of leaving the machine awake all night.

Nice to have

  • Show remaining time in the applet's tooltip/label while a timed session is active.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions