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
| 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:00for 1 hour 30 minutes). Use0,00:00:00, orinffor infinite duration.
Click Actions
toggle: Toggles inhibit on/off using the selected durationcycle: 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}" } ]}{ "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}" } ]}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}[[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 |
For more information on styling, please see the styling guide.