polybar: detect brightness module to use

This commit is contained in:
Vincent Bernat 2022-09-14 01:15:18 +02:00
parent 7f40044fd0
commit fed3082710
2 changed files with 2 additions and 1 deletions

View file

@ -2,6 +2,7 @@
export DPI=$(xrdb -query | sed -nE 's/^Xft\.dpi:\s*//p')
export HEIGHT=$((20 * DPI / 96))
export BACKLIGHT=$(cd /sys/class/backlight ; ls | head -1)
polybar --version

View file

@ -82,7 +82,7 @@ include-file = $XDG_RUNTIME_DIR/i3/polybar-filesystems.conf
[module/brightness]
type = internal/backlight
card = intel_backlight
card = ${env:BACKLIGHT:intel_backlight}
format = <ramp> <label>
label = %percentage: 2%%
ramp-0 = 