Skip to content

fix(audio_osd): use percent to check volume icon#3169

Draft
jeffydc wants to merge 1 commit into
noctalia-dev:mainfrom
jeffydc:jeffydc/push-prnzksxlplmo
Draft

fix(audio_osd): use percent to check volume icon#3169
jeffydc wants to merge 1 commit into
noctalia-dev:mainfrom
jeffydc:jeffydc/push-prnzksxlplmo

Conversation

@jeffydc

@jeffydc jeffydc commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR changes to use the percent instead of volume to compute the volume icon.

Let me know if this is not the correct direction or any further changes are required.

Motivation

fix #3168

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring
  • Build / packaging

Related Issue

Testing

Manual Coverage

  • Tested on Niri
  • Tested on Hyprland
  • Tested on Sway
  • Tested on another compositor:
  • Tested with different bar positions and density settings
  • Tested at different interface scaling values
  • Tested with multiple monitors

Screenshots / Videos

From 5%:
Screenshot from 2026-06-27 04-21-46

To 0%:
Screenshot from 2026-06-27 04-21-59

Checklist

  • This PR is ready for review, or it is marked as Draft.
  • I read and followed the relevant guidance in CONTRIBUTING.md.
  • I ran just format with clang-format v22+ installed, or this PR has no code changes.
  • I ran the relevant build or test commands, or explained why they were not run.
  • I self-reviewed the changes.
  • I checked for new warnings or errors.
  • I will update end-user documentation after merge, or this PR does not change user-facing configuration or behavior.
  • I added or updated assets/translations/en.json, or this PR adds no new user-facing strings.
  • I did not edit non-English translation files unless this PR is explicitly for translation tooling, an import/export sync, or a maintainer-requested locale change.
  • I used the existing canonical names for config keys, IPC names, paths, and identifiers.

Additional Notes

Ly-sec added the epsilon change in this commit. However, I couldn't find any further context so maybe he could provide additional context about that change.

@ItsLemmy

Copy link
Copy Markdown
Collaborator

I dont see how this would fix #3168

Comment thread src/shell/osd/audio_osd.cpp Outdated
@ItsLemmy ItsLemmy marked this pull request as draft June 29, 2026 03:17
@jeffydc jeffydc force-pushed the jeffydc/push-prnzksxlplmo branch 2 times, most recently from 1261dfd to 6fdf497 Compare June 29, 2026 18:27
@jeffydc jeffydc changed the title fix(audio_osd): compare current and last volume without epsilon fix(audio_osd): use percent to check volume icon Jun 29, 2026
@jeffydc jeffydc force-pushed the jeffydc/push-prnzksxlplmo branch from 6fdf497 to 92af781 Compare June 29, 2026 18:29
@jeffydc

jeffydc commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

I dont see how this would fix #3168

I tried to use the percent instead of volume. The icon is now correct, but there seems a little of progress even at 0%. I think volume is computed manually instead of reading from PipeWire. There seems some pending and flushing of setting volume for sink/source.

image

Can you guide me how should I move forward?
Thanks.

@jeffydc jeffydc requested a review from ItsLemmy June 30, 2026 05:16
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.

[BUG] audio_osd & volume widget do not sync

2 participants