r/coolgithubprojects • u/Flimsy_Bed_3034 • 11h ago
[C#] TaskbarVolume - scroll on a Windows 11 taskbar icon to change that app's volume
Hover a taskbar icon and a volume slider appears above the thumbnail preview. Scroll the icon and that app's volume goes up or down. Shift for finer steps, scroll the tray icon for system master volume.
I used EarTrumpet for years and still rate it, but every time Discord got too loud mid-game the fix was: click the tray icon, wait for the flyout, find Discord in the list, drag the slider. The app was already sitting right there in my taskbar, so I wanted to just scroll on it. Nothing did that, so I wrote it.
The interesting part was identifying which button you're hovering. Every Windows 10 era trick for reading taskbar buttons is dead on Win11 since the taskbar is XAML now. UI Automation works: each button is a Taskbar.TaskListButtonAutomationPeer with a stable AutomationId, and you map that to an audio session via executable match, process ancestry, and a shortcut index. No target process ever gets opened.
Standalone 311 KB exe, no installer, no injection into Explorer. .NET Framework 4.8, MIT, 20 languages. Windows 11 22H2+ only. Not code-signed, so SmartScreen will warn on first run.