question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug]: switch-audio does not on macOS 13 Ventura

See original GitHub issue

Describe the bug

switch-audio workflow is no longer working on macOS 13 Ventura.

Behavior: The sound and voice commands do not return the devices list.

MacOS Version

macOS 13 Ventura

Alfred Version

Alfred 5.0.5

Workflow Name

Switch Audio

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
TobiasMendecommented, Dec 15, 2022

I have adapted it locally to work with Mac OS Ventura. I am using switchaudio-osx and jq in order to select and switch the devices without relying on AppleScript and the System Settings.

Therefore, my solution is not an easy drop-in, but in case you are interested, my main.sh looks like:

#!/bin/zsh
type=$1
current=$(SwitchAudioSource -c -t $type -f json)
current_id=$(echo $current | jq -r '.id')
current_extended=$(echo $current | jq -rc --arg TYPE "$type" '{title: .name, uid: .name, autocomplete: .name, arg: .id, icon: {path: ("./icons/"+ $TYPE + "_selected.png")}}')
all_without_current=$(SwitchAudioSource -a -t $type -f json | jq -rc --arg CURRENT "$current_id" 'select(.id != $CURRENT) | {title: .name, uid: .name, autocomplete: .name, arg: .id}')
echo "$all_without_current\n$current_extended" | jq -r --slurp 'sort_by(.title) | {items: .}'

can be called via ZSH ./main.sh output (or input)

Preconditions can be installed via

brew install switchaudio-osx jq

The actual command for switching then is a ZSH script as well

SwitchAudioSource -i $1 > /dev/null

SwitchAudioSource -c

If that is a path you consider going with the plugin, I am happy to provide a PR.

0reactions
feeltenscommented, Dec 31, 2022

@alanhg

Hope to help fix the bug: https://forum.keyboardmaestro.com/t/macro-set-sound-output-v4-0/23959

I like Alfred rather than Keyboard Maestro.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What's new in the updates for macOS Ventura - Apple Support
This update includes bug fixes and security updates and is recommended for all users. macOS Ventura 13.0. macOS Ventura makes the things you...
Read more >
macOS Ventura (13.x) - Bugs - MacRumors Forums
Moving the cursor in text with the keyboard is buggy, sometimes the cursor moves very fast/jumps, sometimes it moves very slow, character for ......
Read more >
macOS 13 Ventura superguide: Everything you need to know
There are no other known bugs or issues with macOS Ventura. We'll update this section as they arise. macOS Ventura: New features. macOS...
Read more >
[BUG] Finder dialog doesn't show on macOS 13 Ventura beta
The issue is that the file object seems to not contain a path when selected, but when you drag and drop it does....
Read more >
How to fix common macOS Ventura issues - Setapp
How to fix macOS Ventura problems: Top 10 issues and solutions · macOS Ventura download stuck · Installation failed error · Setup won't...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found