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

Fix backlight initial value matching the actual brightness level #3081

Merged
merged 2 commits into from
Jan 20, 2024

Conversation

patrick96
Copy link
Member

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update
  • Other: Replace this with a description of the type of this PR

Description

Applies #3080 to the 3.7.2 hotfix branch. Thanks to @unclechu for fixing this!

Related Issues & Documents

Closes #3080

Documentation (check all applicable)

  • This PR requires changes to the Wiki documentation (describe the changes)
  • This PR requires changes to the documentation inside the git repo (please add them to the PR).
  • Does not require documentation changes

unclechu and others added 2 commits January 20, 2024 17:53
The initial value is `0`. If the actual brightness is also `0` you see
`%percentage%` token as text, it’s not being replaced. Since
`m_brightness` is an `int` the initial value could be just `-1` since
the actual brightness is never goes below zero. Thus this bug will never
show up again because actual brightness on first render won’t match
the “old” `m_brightness` value.

See also for more detailed explanation of the bug:
polybar#3079 (comment)
@patrick96 patrick96 merged commit 8e04f15 into polybar:hotfix/3.7.2 Jan 20, 2024
9 checks passed
@patrick96 patrick96 deleted the fix/backlight-initial branch January 20, 2024 17:09
@patrick96 patrick96 added this to the 3.7.2 milestone Jan 20, 2024
@patrick96 patrick96 mentioned this pull request Aug 17, 2024
1 task
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

Successfully merging this pull request may close these issues.

2 participants