Hummer12007 / brightnessctl

A program to read and control device brightness
Other
855 stars 47 forks source link

--class only selects one device #107

Open BeeverFeever opened 3 months ago

BeeverFeever commented 3 months ago

When I run brightnessctl -c 'leds' <operation> it only gets the info of one device from the leds class. Is this intended behavior or is it a bug?

Theluga commented 2 months ago

the wild card also does not work not even without the class. It only selects the first match like brightnessctl -d "input6::*" s 0

If I write:

$ brightnessctl -c "leds" -d "input*" s 0            

Updated device 'input6::numlock':
Device 'input6::numlock' of class 'leds':
    Current brightness: 0 (0%)
    Max brightness: 1

give the same output.

$ brightnessctl -l                                 

Available devices:
Device 'amdgpu_bl0' of class 'backlight':
    Current brightness: 10 (4%)
    Max brightness: 255

Device 'enp2s0-0::lan' of class 'leds':
    Current brightness: 0 (0%)
    Max brightness: 255

Device 'input6::numlock' of class 'leds':
    Current brightness: 1 (100%)
    Max brightness: 1

Device 'input6::kana' of class 'leds':
    Current brightness: 0 (0%)
    Max brightness: 1

Device 'input6::scrolllock' of class 'leds':
    Current brightness: 0 (0%)
    Max brightness: 1

Device 'input19::numlock' of class 'leds':
    Current brightness: 1 (100%)
    Max brightness: 1

Device 'input6::compose' of class 'leds':
    Current brightness: 0 (0%)
    Max brightness: 1

Device 'input5::capslock' of class 'leds':
    Current brightness: 0 (0%)
    Max brightness: 1

Device 'enp2s0-2::lan' of class 'leds':
    Current brightness: 0 (0%)
    Max brightness: 255

Device 'input19::capslock' of class 'leds':
    Current brightness: 0 (0%)
    Max brightness: 1

Device 'input5::scrolllock' of class 'leds':
    Current brightness: 0 (0%)
    Max brightness: 1

Device 'enp2s0-1::lan' of class 'leds':
    Current brightness: 0 (0%)
    Max brightness: 255

Device 'input5::numlock' of class 'leds':
    Current brightness: 1 (100%)
    Max brightness: 1

Device 'input6::capslock' of class 'leds':
    Current brightness: 0 (0%)
    Max brightness: 1

Device 'input19::scrolllock' of class 'leds':
    Current brightness: 0 (0%)
    Max brightness: 1
gustafla commented 2 months ago

I would also prefer to have this support an easy oneliner which applies command to all wildcard matches. I might look into submitting a pr.