Skip to content

PulseVolumeWidget: Add checkbox to indicate current sink #430

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

Merged
merged 1 commit into from
Jul 16, 2025

Conversation

laomuon
Copy link
Contributor

@laomuon laomuon commented Jul 9, 2025

Add a checkbox to indicate current sink in PulseVolumeWidget

@elParaguayo
Copy link
Owner

Thanks! This is a great addition. Can you just include a screenshot here so I can the effect of the change?

The docs error is unrelated to you PR. Just an issue I haven't had time to fix yet.

@laomuon
Copy link
Contributor Author

laomuon commented Jul 10, 2025

Can you just include a screenshot here so I can the effect of the change?

Hi, it would look like this
image

@elParaguayo
Copy link
Owner

That's a huge improvement.

I just need to fix the other issue that's broken all the tests and then we can run CI on this. Will try to do it this weekend if I can.

@elParaguayo
Copy link
Owner

@laomuon Can you rebase this onto the current main branch and force push this. I'd expect tests to pass now and I would like to get this one merged.

@elParaguayo
Copy link
Owner

Looks like you need to do this:

diff --git a/qtile_extras/widget/pulse_volume.py b/qtile_extras/widget/pulse_volume.py
index 7f60bec..a99e00d 100644
--- a/qtile_extras/widget/pulse_volume.py
+++ b/qtile_extras/widget/pulse_volume.py
@@ -75,14 +75,14 @@ class PulseVolume(QPulseVolume, MenuMixin):
 
         default_sink_name = (await pulse.pulse.server_info()).default_sink_name
         for sink in sinks:
-                menu_items.append(
-                    pmi(
-                        text=sink.description,
-                        toggle_box=True,
-                        toggled= default_sink_name == sink.name,
-                        **_callback(sink)
-                    )
+            menu_items.append(
+                pmi(
+                    text=sink.description,
+                    toggle_box=True,
+                    toggled=default_sink_name == sink.name,
+                    **_callback(sink),
                 )
+            )

@elParaguayo elParaguayo merged commit 7d72041 into elParaguayo:main Jul 16, 2025
13 checks passed
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