[PR #1475] [MERGED] fix(volume): volume respects default sink and source #2798

Closed
opened 2026-05-22 22:57:52 +01:00 by JakeStanger · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/JakeStanger/ironbar/pull/1475
Author: @MrFantOlas
Created: 4/28/2026
Status: Merged
Merged: 4/28/2026
Merged by: @JakeStanger

Base: masterHead: respect-default-sink


📝 Commits (2)

  • 12ace28 fix(volume): volume respects default sink and source
  • 5a43f1f Update src/modules/volume/mod.rs

📊 Changes

1 file changed (+36 additions, -5 deletions)

View changed files

📝 src/modules/volume/mod.rs (+36 -5)

📄 Description

Should help #1166.
This prevents the drop menu from selecting the first appended item and then trying to set it as the default sink.

Edit: This appends when the list is empty, then one item is appended to the list. This results in the notify event being triggered and then the sink to change to that first sink appended. Same for source.

The drop menu now has a default state where an item No Sink or No Source is preappended to it. This prevents setting the default sink multiple times resulting in inconsistent sink selection (or source).

The following section works for sink and sources.
This now only fires a single notify event to select the default sink sent by PA. If PA sends no default sink, i.e. noSinkUpdate then the default no sink available is shown. If this update is send and the sink is valid this option is removed.

I tested this restarting the bar multiple time back to back s this would facilitate the race condition where my sink or source would get changed. This also prevents the bar switching aggressively between two sinks at startup, and may also help with #1411.

It is to be noted that selecting no item in the drop down menu does not work, and this may also be a bug on the gtk side. I though I would offer a solution as I am unsure if this is the default behavior of the drop down menu (the documentation is minimal and I am not very proficient in gtk to say the least).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/JakeStanger/ironbar/pull/1475 **Author:** [@MrFantOlas](https://github.com/MrFantOlas) **Created:** 4/28/2026 **Status:** ✅ Merged **Merged:** 4/28/2026 **Merged by:** [@JakeStanger](https://github.com/JakeStanger) **Base:** `master` ← **Head:** `respect-default-sink` --- ### 📝 Commits (2) - [`12ace28`](https://github.com/JakeStanger/ironbar/commit/12ace28c4e97fbfcd1417d936ad6add8f9d5b300) fix(volume): volume respects default sink and source - [`5a43f1f`](https://github.com/JakeStanger/ironbar/commit/5a43f1f70916af07dfa5b23227b8566d97ad03c1) Update src/modules/volume/mod.rs ### 📊 Changes **1 file changed** (+36 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `src/modules/volume/mod.rs` (+36 -5) </details> ### 📄 Description Should help #1166. This prevents the drop menu from selecting the first appended item and then trying to set it as the default sink. Edit: This appends when the list is empty, then one item is appended to the list. This results in the notify event being triggered and then the sink to change to that first sink appended. Same for source. The drop menu now has a default state where an item No Sink or No Source is preappended to it. This prevents setting the default sink multiple times resulting in inconsistent sink selection (or source). The following section works for sink and sources. This now only fires a single notify event to select the default sink sent by PA. If PA sends no default sink, i.e. no`SinkUpdate` then the default no sink available is shown. If this update is send and the sink is valid this option is removed. I tested this restarting the bar multiple time back to back s this would facilitate the race condition where my sink or source would get changed. This also prevents the bar switching aggressively between two sinks at startup, and may also help with #1411. It is to be noted that selecting no item in the drop down menu does not work, and this may also be a bug on the gtk side. I though I would offer a solution as I am unsure if this is the default behavior of the drop down menu (the documentation is minimal and I am not very proficient in gtk to say the least). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
JakeStanger 2026-05-22 22:57:52 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JakeStanger/ironbar#2798
No description provided.