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

Add percentage labels to volume and brightness indicators #69

Merged
merged 2 commits into from
Sep 11, 2024

Conversation

Ferdi265
Copy link
Contributor

@Ferdi265 Ferdi265 commented Dec 24, 2023

This PR adds a textual percentage next to the progress bar in the volume and brightness indicators. This is useful for users who still want to know the exact volume percentage set in practice.

This is off by default and can be enabled with the show_percentage boolean setting in the [server] block in CONFIG_HOME/swayosd/config.toml.

Example config:

# ~/.config/swayosd/config.toml
[server]
show_percentage = true

@Ferdi265 Ferdi265 force-pushed the volume-brightness-percentage branch from b172bef to 25e69ae Compare December 24, 2023 23:37
Copy link
Owner

@ErikReider ErikReider left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd also prefer if the user could disable this. Might wait with this until config support has been added to undo some of the cmdline arg clutter

src/server/osd_window.rs Outdated Show resolved Hide resolved
@Ferdi265 Ferdi265 force-pushed the volume-brightness-percentage branch from 25e69ae to 9e12cd5 Compare February 12, 2024 21:50
@Ferdi265
Copy link
Contributor Author

I'd also prefer if the user could disable this. Might wait with this until config support has been added to undo some of the cmdline arg clutter

Yes, that is my thought as well. I'm completely fine with leaving this PR hanging until config support is added, I might even help with implementing config support if I find time.

@Ferdi265 Ferdi265 force-pushed the volume-brightness-percentage branch 3 times, most recently from c6f84c5 to c9b6d0d Compare February 18, 2024 14:19
@Ferdi265
Copy link
Contributor Author

Rebased on top of #79 and added a configuration option to enable percentage display.

@Ferdi265 Ferdi265 force-pushed the volume-brightness-percentage branch from c9b6d0d to 04a6652 Compare February 18, 2024 14:59
@ErikReider
Copy link
Owner

I'll wait until #79 is merged :)

@Ferdi265 Ferdi265 force-pushed the volume-brightness-percentage branch from 04a6652 to 2463549 Compare April 21, 2024 16:14
@Ferdi265 Ferdi265 force-pushed the volume-brightness-percentage branch 2 times, most recently from 07f7107 to c6c9604 Compare May 6, 2024 17:07
@Ferdi265 Ferdi265 force-pushed the volume-brightness-percentage branch from c6c9604 to 0a0cb61 Compare August 25, 2024 15:23
@Ferdi265
Copy link
Contributor Author

Ferdi265 commented Aug 25, 2024

rebased onto the merged config branch and updated the PR description.

@rubiin
Copy link

rubiin commented Sep 8, 2024

@ErikReider I think this can be merged

@Ferdi265
Copy link
Contributor Author

Ferdi265 commented Sep 8, 2024

@ErikReider if you'd like to reduce the number of things in the CLI options I can also remove the CLI option added in this PR (I already have a fixup commit for that locally, I'd just need to push it)

@ErikReider
Copy link
Owner

@ErikReider if you'd like to reduce the number of things in the CLI options I can also remove the CLI option added in this PR (I already have a fixup commit for that locally, I'd just need to push it)

That would be appreciated! :D

@Ferdi265 Ferdi265 force-pushed the volume-brightness-percentage branch from 0a0cb61 to 2e2c1bb Compare September 11, 2024 19:24
@Ferdi265
Copy link
Contributor Author

@ErikReider if you'd like to reduce the number of things in the CLI options I can also remove the CLI option added in this PR (I already have a fixup commit for that locally, I'd just need to push it)

That would be appreciated! :D

done

Copy link
Owner

@ErikReider ErikReider left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your patience! :)

@ErikReider ErikReider merged commit c4bbb21 into ErikReider:main Sep 11, 2024
1 check passed
@Ferdi265 Ferdi265 deleted the volume-brightness-percentage branch September 11, 2024 19:28
@Ferdi265 Ferdi265 restored the volume-brightness-percentage branch September 11, 2024 19:28
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.

3 participants