Module: backlight - Cationiz3r/polybar GitHub Wiki

This module shows information about the current monitor brightness setting.

The values for that are read from files in the /sys/class/backlight/ folder. Every folder in /sys/class/backlight/ represents one backlight in your system (many desktops will have no backlights at all) and in that subfolder, the module will use the files brightness, actual_brightness, and max_brightness to determine the current brightness.

Whether the brightness or actual_brightness file is used to get the current brightness is controlled by the use-actual-brightness setting. We recommend using the actual_brightness file (the default) because it should get real-time updates.

However, depending on your device, the actual_brightness file may not hold the correct values or may not update correctly.

Basic settings

[module/backlight]
type = internal/backlight

; Use the following command to list available cards:
; $ ls -1 /sys/class/backlight/
card = intel_backlight

; Use the `/sys/class/backlight/.../actual-brightness` file
; rather than the regular `brightness` file.
; Defaults to true unless the specified card is an amdgpu backlight.
; New in version 3.6.0
use-actual-brightness = true

; Enable changing the backlight with the scroll wheel
; NOTE: This may require additional configuration on some systems. Polybar will
; write to `/sys/class/backlight/${self.card}/brightness` which requires polybar
; to have write access to that file.
; DO NOT RUN POLYBAR AS ROOT. 
; The recommended way is to add the user to the
; `video` group and give that group write-privileges for the `brightness` file.
; See the ArchWiki for more information:
; https://wiki.archlinux.org/index.php/Backlight#ACPI
; Default: false
enable-scroll = true

Additional formatting

; Available tags:
;   <label> (default)
;   <ramp>
;   <bar>
format = <label>

; Available tokens:
;   %percentage% (default)
label = %percentage%%

; Only applies if <ramp> is used
ramp-0 = 🌕
ramp-1 = 🌔
ramp-2 = 🌓
ramp-3 = 🌒
ramp-4 = 🌑

; Only applies if <bar> is used
bar-width = 10
bar-indicator = |
bar-fill = ─
bar-empty = ─

References

⚠️ **GitHub.com Fallback** ⚠️