Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--min-value prevents all value changes #82

Open
SavageMessiah opened this issue Oct 31, 2022 · 5 comments
Open

--min-value prevents all value changes #82

SavageMessiah opened this issue Oct 31, 2022 · 5 comments

Comments

@SavageMessiah
Copy link

I'm trying to use --min-value in order to keep something like brightnessctl set 5%- from turning my screen off. However it seems that setting --min-value is preventing ANY change from happening, even if it is above the minimum specified.

~
❯ brightnessctl set 10000
Updated device 'intel_backlight':
Device 'intel_backlight' of class 'backlight':
	Current brightness: 10000 (10%)
	Max brightness: 96000


~
❯ brightnessctl --min-value 5000 set 7000
Device 'intel_backlight' of class 'backlight':
	Current brightness: 10000 (10%)
	Max brightness: 96000


~
❯ brightnessctl --min-value 5000 set 1%-
Device 'intel_backlight' of class 'backlight':
	Current brightness: 10000 (10%)
	Max brightness: 96000


~
❯ brightnessctl --min-value 5000 set 1%+
Device 'intel_backlight' of class 'backlight':
	Current brightness: 10000 (10%)
	Max brightness: 96000


~
❯ brightnessctl --min-value 5000 set 11000
Device 'intel_backlight' of class 'backlight':
	Current brightness: 10000 (10%)
	Max brightness: 96000
@rodericasm
Copy link

not a fix, but i got around this by having an external script that clamps the set value between min and max. dirty but it works.

@jrollins
Copy link

I'm also experiencing this issue, it seems that the --min-value option is broken.

@neuromagus
Copy link

yep. --min-value not work.

@jrollins
Copy link

I think I have a work around. I haven't looked at the code, but I think the problem is related to the argument parsing. I seem to have gotten it to work if I use the long form of the option, and I specify the minimum value in absolute units instead of as a percent. So this command seems to be doing the correct thing for me:

brightnessctl set --min-value=150 1%-

With that command it does actually bottom out at a brightness level of 150.

@neuromagus
Copy link

neuromagus commented Aug 24, 2023

thanks.

trueNAHO added a commit to trueNAHO/dotfiles that referenced this issue Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants