Skip to content

Inhibit

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

Configuration

Type: inhibit

NameTypeDefaultDescription
durationsstring[]See belowList of durations to cycle through. See duration format.
default_durationstring00:30:00Starting 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'nullAction on middle click.
format_onstring☕ {duration}Format string when inhibit is active. Pango markup supported.
format_offstring💤 {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

TokenDescription
{duration}Current duration.

Styling

SelectorDescription
.inhibitInhibit widget button

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