You use xrandr | awk '/ primary/{print $1}' to find which display to change the brightness of in the example in the README. This doesn't work on my machine, the display I'm using isn't "primary", even though it's the only one plugged in. Here's my xrandr output.
enolan@chonk ~/m/c/nixpkgs> xrandr
Screen 0: minimum 8 x 8, current 3840 x 2160, maximum 32767 x 32767
DP-0 disconnected primary (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
DP-4 connected 3840x2160+0+0 (normal left inverted right x axis y axis) 600mm x 340mm
3840x2160 60.00*+ 30.00
2560x1440 59.95
1920x1080 60.00 59.94
1600x900 60.00
1280x1024 60.02
1280x800 59.81
1280x720 60.00 59.94
1152x864 59.96
1024x768 60.00
800x600 60.32
720x480 59.94
640x480 59.94 59.93
DP-5 disconnected (normal left inverted right x axis y axis)
USB-C-0 disconnected (normal left inverted right x axis y axis)
AFAIK I didn't do anything weird to make it decide a disabled output was the primary one.
You use
xrandr | awk '/ primary/{print $1}'
to find which display to change the brightness of in the example in the README. This doesn't work on my machine, the display I'm using isn't "primary", even though it's the only one plugged in. Here's myxrandr
output.AFAIK I didn't do anything weird to make it decide a disabled output was the primary one.