Skip to content

Brightness

Brightness information about screen or led brightness levels in percent. Allows to change the respective value via scrolling.

Configuration

Type: brightness

NameTypeDefaultProfile?Description
formatstring{percentage}%YesFormat string to use for the widget button label.
icon_labelstringnullYesIcon to show alongside the label. Supports image icons.
mode.typesystemd or keyboardsystemdNoThe data backend of the brightness module, this can be either the KdbBrightness dbus which is good for keyboard data, or the more general login1 dbus in combination with /sys/class/{subsystem}.
mode.subsystembacklight or ledsbacklightNoThe name of the subsystem use on the filesystem.
mode.namestring or nullnullNoWhen set, using the specific directory, within /sys/class/{subsystem} . If null the module will try to find a reasonable default.
smooth_scroll_speedfloat1.0NoControls how fast the brightness is changed, e.g. in case touchpad scrolling is used. Negative values swap the scroll direction.
use_default_profilesbooleantrueNoWhether default profiles should be used.

Information on the profiles system can be found here.

JSON
{
"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": ""
}
}
}
]
}
TOML
[[end]]
type = "brightness"
format = "{percentage}%"
smooth_scroll_speed = 0.5
[end.mode]
type = "systemd"
subsystem = "backlight"
name = "amdgpu_bl1"
[end.profiles.low]
when = 25
format = "{percentage}%"
icon_label = ""
[end.profiles.high]
when = 100
format = "{percentage}%"
icon_label = ""
YAML
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: ""
Corn
{
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 = ""
}
]
}

Icons

The icon is configured per profile using the icon_label option.

Brightness ships with default profiles that set icons for percentage ranges:

ProfileThreshold (<=)Icon
level05
level1015
level2025
level3035
level4045
level5055
level6065
level7075
level8085
level9095
level100100

Default profiles

Show
{
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 = ""
}

Formatting Tokens

The following tokens can be used in the format config option:

TokenDescription
{percentage}The active brightness percentage.

Styling

SelectorDescription
.brightnessBrightness widget button
.brightness .labeltext, which is controlled via format
.brightness .iconicon, which is controlled via icon_label

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