Post

Since switching to Linux on my MacBook, I've been running Discord and some other apps as Chrome Web apps. It's nice that you can easily wrap any page into its own launcher icon. What's not so nice is that all apps' audio streams just end up as "Chromium" in the system.

This is especially annoying if you want Discord or Slack to always output on your headphones, and a music streaming page on a different output. The Linux audio system supports this, but since everything just ends up as "Chromium", all new audio is always routed to the last selection.

I'm not a C++ developer, but I wanted to fix that. And is there a better usage of morally questionable AI models than to actually improve open source code?

So now I have a local fork of ungoogled-chromium that actually sets the correct pulseaudio properties for each audio stream. It dynamically updates the stream label when the document title changes and it ensures that the correct app information for web apps is set.

The issue with that is that if you want to have some rules applied like "always route Discord to my headphones", such rules only work when the stream is initially created. It took me quite some back and forth, recompiling Chromium, and testing to have something that reliably works.

So now I have a 600 line patch for Chromium, but I have absolutely now experience in contributing to Chromium and since it's LLM-generated code, I don't have C++ experience, it doesn't have any tests, and only benefits Linux+Pulseaudio, it's quite unlikely that it ends up in Chrome.

Since I have a fork of Chrome anyway now, another thing I changed is that external links in those web apps end up being opened by the system default browser instead. I use the Zen browser as default and only run Chromium for its web app integration. Links in Slack now properly open in Zen :)

No replies yet.