2026-09-18 10:06 UTC
Three weeks ago, I wrote a little shell script to connect and disconnect my headphones because I got annoyed by having to find right icons and items from the menu bar. (https://notes.hamatti.org/technology/recipes/connecting-my-bluetooth-headphones-with-shell-command)
I had no idea it would be this impactful. My quality of life using headphones with my laptop when out and about increased significantly. All with less than 100 lines of code.
Replies (1)
-
@earthtoneone@mstdn.social 2026-09-20 12:49
@hamatti@mastodon.world The thing that got me was alternating between Bluetooth and wired headsets, and having to dig into the sound menu just to change the mic input - maddening! I found a CLI util SwitchAudioSource for that, and built a script around it ("aud b" = use next available BT device, "aud t" = toggle, etc) - then I mapped the toggle command to a keyboard button. Most useful BASH I've ever written. But I'm still manually connecting my BT like a plebe... 🤔