Skip to content

Inhibit

Jake Stanger edited this page Sep 20, 2026 · 2 revisions

Prevents the compositor from auto-suspending the system or auto-locking the screen. Click to toggle inhibit on/off or cycle through preset durations.

Note

Inhibit is tracked globally (system-wide). Multiple inhibit modules share the same inhibit state.

Configuration

Type: inhibit

Name Type Default Description
durations string[] See below List of durations to cycle through. See duration format.
default_duration string 00:30:00 Starting duration. Defaults to first in durations.
on_click_left 'toggle' or 'cycle' 'toggle' Action on left click.
on_click_right 'toggle' or 'cycle' 'cycle' Action on right click.
on_click_middle 'toggle' or 'cycle' null Action on middle click.
format_on string ☕ {duration} Format string when inhibit is active. Pango markup supported.
format_off string 💤 {duration} Format string when inhibit is inactive. Pango markup supported.

Default durations: ["00:30:00", "01:00:00", "01:30:00", "02:00:00", "inf"]

Duration format: Time format HH:MM:SS (e.g., 01:30:00 for 1 hour 30 minutes). Use 0, 00:00:00, or inf for infinite duration.

Click Actions

  • toggle: Toggles inhibit on/off using the selected duration
  • cycle: Cycles to the next duration in the list (and applies it if already active)
JSON
{
  "end": [
    {
      "type": "inhibit",
      "durations": ["00:30:00", "01:00:00", "01:30:00", "02:00:00", "inf"],
      "default_duration": "00:30:00",
      "on_click_left": "toggle",
      "on_click_right": "cycle",
      "format_on": "☕ {duration}",
      "format_off": "💤 {duration}"
    }
  ]
}
TOML
[[end]]
type = "inhibit"
durations = ["00:30:00", "01:00:00", "01:30:00", "02:00:00", "inf"]
default_duration = "00:30:00"
on_click_left = "toggle"
on_click_right = "cycle"
format_on = "☕ {duration}"
format_off = "💤 {duration}"
YAML
end:
  - type: "inhibit"
    durations: ["00:30:00", "01:00:00", "01:30:00", "02:00:00", "inf"]
    default_duration: "00:30:00"
    on_click_left: "toggle"
    on_click_right: "cycle"
    format_on: "☕ {duration}"
    format_off: "💤 {duration}"
Corn
{
  end = [
    {
      type = "inhibit"
      durations = ["00:30:00" "01:00:00" "01:30:00" "02:00:00" "inf"]
      default_duration = "00:30:00"
      on_click_left = "toggle"
      on_click_right = "cycle"
      format_on = "☕ {duration}"
      format_off = "💤 {duration}"
    }
  ]
}

Formatting Tokens

Token Description
{duration} Current duration.

Styling

Selector Description
.inhibit Inhibit widget button
.inhibit.off Inhibit widget button when inhibition is off
.inhibit.on Inhibit widget button when inhibition is on

For more information on styling, please see the styling guide.

Clone this wiki locally