mirror of
https://github.com/JakeStanger/ironbar.git
synced 2026-07-11 06:15:21 +01:00
[PR #1475] [MERGED] fix(volume): volume respects default sink and source #4205
Labels
No labels
A:Build
A:CI
A:Client
A:Config
A:Core
A:Documentation
A:Documentation
A:IPC
A:Testing
A:UX/UI
blocked
BREAKING CHANGE
duplicate
good first issue
GTK4
help wanted
invalid
M:Battery
M:Battery
M:Bindmode
M:Bluetooth
M:Brightness
M:Cairo
M:Clipboard
M:Clock
M:Clock
M:Custom
M:Focused
M:Keyboard
M:Launcher
M:Menu
M:Music
M:Music
M:Music
M:Network Manager
M:Notifications
M:SysInfo
M:Tray
M:Volume
M:Workspaces
partially resolved
P:Critical
P:High
P:Low
P:Medium
pull-request
T:Bug
T:Bug
T:Core Enhancement
T:Module Enhancement
T:New Module
T:Question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
JakeStanger/ironbar#4205
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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:
master← Head:respect-default-sink📝 Commits (2)
12ace28fix(volume): volume respects default sink and source5a43f1fUpdate 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. no
SinkUpdatethen 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.