Last active
February 19, 2024 20:29
-
-
Save joker1007/4eb9fc5d483eb617e563bf621a4d512e to your computer and use it in GitHub Desktop.
pipewire audio selector
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
id=$(pw-dump Node | jq -r 'map({id: .id, class: .info.props["media.class"], desc: .info.props["node.description"]} | select(.desc != null)) | sort_by(.class, .desc) | .[] | [.id, .class, .desc] | @tsv' | wofi -di | cut -f 1) | |
if [ -n "$id" ]; then | |
echo "Setting default to $id" | |
wpctl set-default $id | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment