alex-courtis / way-displays

way-displays: Auto Manage Your Wayland Displays
MIT License
267 stars 13 forks source link

Configurable range for auto scale #136

Closed dancek closed 1 year ago

dancek commented 1 year ago

Scales below 1.0 are typically unuseful, so make 1.0 a minimum auto scale by default.

Add configuration options for minimum and maximum auto scale, in case someone actually wants scales under 1.0 or wishes to limit the maximum scale.

Fixes #135.

dancek commented 1 year ago

I decided to make it configurable while I'm at it, and also add an optional maximum. (If I had access to multiple slightly over 200dpi displays I might well want to limit the maximum to 2.0.)

There's no command-line interface for adjusting the range as that feels like a rare operation.

alex-courtis commented 1 year ago

I decided to make it configurable while I'm at it, and also add an optional maximum. (If I had access to multiple slightly over 200dpi displays I might well want to limit the maximum to 2.0.)

Many thanks. We'll likely need max at some stage...

There's no command-line interface for adjusting the range as that feels like a rare operation.

That's fine, it would indeed be rare.

dancek commented 1 year ago

Thanks for a really good review! I'll work on these when I have time (hopefully in a couple of days) and get back to you!

dancek commented 1 year ago

cli / log

  • [ ] shows in -g

Added.

min

  • [ ] default - when min not present scale is always set to 1

Actually this was when max wasn't set, due to accidentally using the default min value as the default max value too. Fixed.

odd

  • [ ] min > max - not quite predictable

Fixed by disabling it in this case.


Give it another look with these fixes. I'll be happy to fix any further issues.

alex-courtis commented 1 year ago

Many thanks for your contribution!

Can you wait for a release? I'd like to get #121 in as well...

dancek commented 1 year ago

I'm in no hurry, take your time!