Brightness
Brightness information about screen or led brightness levels in percent. Allows to change the respective value via scrolling.
Example
{ end = [ { type = "brightness" format = "{percentage}%" smooth_scroll_speed = 0.5
mode.type = "systemd" mode.subsystem = "backlight" mode.name = "amdgpu_bl1"
profiles.low.when = 25 profiles.low.format = "{percentage}%" profiles.low.icon_label = ""
profiles.high.when = 100 profiles.high.format = "{percentage}%" profiles.high.icon_label = "" } ]}{ "end": [ { "type": "brightness", "format": "{percentage}%", "smooth_scroll_speed": 0.5, "mode": { "type": "systemd", "subsystem": "backlight", "name": "amdgpu_bl1" }, "profiles": { "low": { "when": 25, "format": "{percentage}%", "icon_label": "" }, "high": { "when": 100, "format": "{percentage}%", "icon_label": "" } } } ]}end: - type: brightness format: "{percentage}%" smooth_scroll_speed: 0.5 mode: type: systemd subsystem: backlight name: amdgpu_bl1 profiles: low: when: 25 format: "{percentage}%" icon_label: high: when: 100 format: "{percentage}%" icon_label: [[end]]type = "brightness"format = "{percentage}%"smooth_scroll_speed = 0.5
[end.mode] type = "systemd" subsystem = "backlight" name = "amdgpu_bl1"
[end.profiles.low]when = 25format = "{percentage}%"icon_label = ""
[end.profiles.high]when = 100format = "{percentage}%"icon_label = ""Configuration
Type:
brightness
formatProfile
Section titled “formatProfile”The format string to use for the widget button label.
The following tokens can be used:
| Token | Description |
|---|---|
{percentage} | The active brightness percentage. |
Type: string
Default: {percentage}%
icon_labelProfile
Section titled “icon_labelProfile”The icon to show on the bar widget button. Supports image icons.
Type: string
Default: None
use_default_profiles
Section titled “use_default_profiles”Whether the default profile map should be merged in.
Type: boolean
Default: true
modeEnum
Section titled “modeEnum”Where to get the brightness data from
See [BrightnessDataSource].
Default: None
1keyboard
Section titled “1keyboard”using the keyboard dbus. Note: this only works for keyboards, not for screen brightness.
2systemd
Section titled “2systemd”using the login1 dbus and fs for reading. This works for keyboard and screen brightness, but needs the filesystem for reading the data and dbus for adjusting.
Object keys
systemd.subsystemRequired
Section titled “systemd.subsystemRequired”The subsystem to read the data from, e.g. backlight or leds. Subsystem refers to the directory within /sys/class/.
Type: string
Default: None
systemd.name
Section titled “systemd.name”The name of the resource, see /sys/class/<subsystem> for available resources. If empty, ironbar will try to resolve it via a hardcoded list of common resources
Type: string
Default: None
truncateEnum
Section titled “truncateEnum”See truncate options.
Default: None
Do not truncate content.
Setting this option may cause excessively long content to overflow other widgets, shifting them off-screen.
Example
Section titled “Example”{ truncate = "off" }{ "truncate": "off"}truncate: offtruncate = "off"2'none' | 'start' | 'middle' | 'end'
Section titled “2'none' | 'start' | 'middle' | 'end'”Auto mode lets GTK decide when to ellipsize.
To use this mode, set the truncate option to a string declaring the location to truncate text from and place the ellipsis.
Example
Section titled “Example”{ truncate = "start" }{ "truncate": "start"}truncate: starttruncate = "start"3Object (Length)
Section titled “3Object (Length)”Length mode defines a fixed point at which to ellipsize.
Generally you will want to set only one of length or max_length,
but you can set both if required.
Example
Section titled “Example”{ truncate.mode = "start" truncate.length = 50 truncate.max_length = 70}{ "truncate": { "mode": "start", "length": 50, "max_length": 70 }}truncate: mode: start length: 50 max_length: 70[truncate]mode = "start"length = 50max_length = 70Object keys
Object (Length).mode
Section titled “Object (Length).mode”The location to truncate text from and place the ellipsis.
Type: 'none' | 'start' | 'middle' | 'end'
Default: None
Object (Length).length
Section titled “Object (Length).length”The fixed width (in characters) of the widget.
The widget will be expanded to this width if it would have otherwise been smaller.
Leave unset to let GTK automatically handle.
Type: integer (int32)
Default: None
Object (Length).max_length
Section titled “Object (Length).max_length”The maximum number of characters to show before truncating.
Leave unset to let GTK automatically handle.
Type: integer (int32)
Default: None
orientation
Section titled “orientation”The orientation to display the widget contents.
Type: 'horizontal' | 'vertical'
Default: 'horizontal'
justify
Section titled “justify”The justification (alignment) of the widget text shown on the bar.
Type: 'left' | 'right' | 'center' | 'fill'
Default: 'left'
Icons
The icon is configured per profile using the icon_label option.
Brightness ships with default profiles that set icons for percentage ranges:
| Profile | Threshold (<=) | Icon |
|---|---|---|
level0 | 5 | |
level10 | 15 | |
level20 | 25 | |
level30 | 35 | |
level40 | 45 | |
level50 | 55 | |
level60 | 65 | |
level70 | 75 | |
level80 | 85 | |
level90 | 95 | |
level100 | 100 | |
Default profiles
{ level0.when = 5.0 level0.icon_label = ""
level10.when = 15.0 level10.icon_label = ""
level20.when = 25.0 level20.icon_label = ""
level30.when = 35.0 level30.icon_label = ""
level40.when = 45.0 level40.icon_label = ""
level50.when = 55.0 level50.icon_label = ""
level60.when = 65.0 level60.icon_label = ""
level70.when = 75.0 level70.icon_label = ""
level80.when = 85.0 level80.icon_label = ""
level90.when = 95.0 level90.icon_label = ""
level100.when = 100.0 level100.icon_label = ""}{ "level0": { "when": 5, "icon_label": "" }, "level10": { "when": 15, "icon_label": "" }, "level20": { "when": 25, "icon_label": "" }, "level30": { "when": 35, "icon_label": "" }, "level40": { "when": 45, "icon_label": "" }, "level50": { "when": 55, "icon_label": "" }, "level60": { "when": 65, "icon_label": "" }, "level70": { "when": 75, "icon_label": "" }, "level80": { "when": 85, "icon_label": "" }, "level90": { "when": 95, "icon_label": "" }, "level100": { "when": 100, "icon_label": "" }}level0: when: 5 icon_label: level10: when: 15 icon_label: level20: when: 25 icon_label: level30: when: 35 icon_label: level40: when: 45 icon_label: level50: when: 55 icon_label: level60: when: 65 icon_label: level70: when: 75 icon_label: level80: when: 85 icon_label: level90: when: 95 icon_label: level100: when: 100 icon_label: [level0]when = 5icon_label = ""
[level10]when = 15icon_label = ""
[level20]when = 25icon_label = ""
[level30]when = 35icon_label = ""
[level40]when = 45icon_label = ""
[level50]when = 55icon_label = ""
[level60]when = 65icon_label = ""
[level70]when = 75icon_label = ""
[level80]when = 85icon_label = ""
[level90]when = 95icon_label = ""
[level100]when = 100icon_label = ""Styling
| Selector | Description |
|---|---|
.brightness | Brightness widget button |
.brightness .label | text, which is controlled via format |
.brightness .icon | icon, which is controlled via icon_label |
For more information on styling, please see the styling guide.