Module i3status_rs::blocks::backlight
source · Expand description
The brightness of a backlight device
This block reads brightness information directly from the filesystem, so it works under both
X11 and Wayland. The block uses inotify
to listen for changes in the device’s brightness
directly, so there is no need to set an update interval. This block uses DBus to set brightness
level using the mouse wheel, but will fallback to sysfs if systemd-logind
is not used.
§Root scaling
Some devices expose raw values that are best handled with nonlinear scaling. The human perception of lightness is close to the cube root of relative luminance, so settings for root_scaling
between 2.4 and 3.0 are worth trying. For devices with few discrete steps this should be 1.0 (linear). More information: https://en.wikipedia.org/wiki/Lightness
§Configuration
Key | Values | Default |
---|---|---|
device | A regex to match against /sys/class/backlight devices to read brightness information from (can match 1 or more devices). When there is no device specified, this block will display information for all devices found in the /sys/class/backlight directory. | Default device |
format | A string to customise the output of this block. See below for available placeholders. | " $icon $brightness " |
missing_format | A string to customise the output of this block. No placeholders available | " no backlight devices " |
step_width | The brightness increment to use when scrolling, in percent | 5 |
minimum | The minimum brightness that can be scrolled down to | 5 |
maximum | The maximum brightness that can be scrolled up to | 100 |
cycle | The brightnesses to cycle through on each click | [minimum, maximum] |
root_scaling | Scaling exponent reciprocal (ie. root) | 1.0 |
invert_icons | Invert icons’ ordering, useful if you have colorful emoji | false |
ddcci_sleep_multiplier | See ddcutil documentation | 1.0 |
ddcci_max_tries_write_read | The maximum number of times to attempt writing to or reading from a ddcci monitor | 10 |
Placeholder | Value | Type | Unit |
---|---|---|---|
icon | Icon based on backlight’s state | Icon | - |
brightness | Current brightness | Number | % |
Action | Default button |
---|---|
cycle | Left |
brightness_up | Wheel Up |
brightness_down | Wheel Down |
§Example
[[block]]
block = "backlight"
device = "intel_backlight"
Hide missing backlight:
[[block]]
block = "backlight"
missing_format = ""
§calibright
Additional display brightness calibration can be set in $XDG_CONFIG_HOME/calibright/config.toml
See https://github.com/bim9262/calibright for more details.
This block will override any global config set in $XDG_CONFIG_HOME/calibright/config.toml
§D-Bus Fallback
If you don’t use systemd-logind
i3status-rust will attempt to set the brightness
using sysfs. In order to do this you’ll need to have write permission.
You can do this by writing a udev
rule for your system.
First, check that your user is a member of the “video” group using the
groups
command. Then add a rule in the /etc/udev/rules.d/
directory
containing the following, for example in backlight.rules
:
ACTION=="add", SUBSYSTEM=="backlight", GROUP="video", MODE="0664"
This will allow the video group to modify all backlight devices. You will also need to restart for this rule to take effect.
§Icons Used
backlight
(as a progression)