Skip to content

Commit e976de0

Browse files
committed
Add listing of nodes to the audio script
1 parent dc00466 commit e976de0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

zsh/custom/audio.zsh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ pipewire_id() {
1515

1616
audioconf() {
1717
# Audio configuration script for PipeWire
18-
# You can find the node names with:
19-
# pw-cli i all | grep "node.name"
2018
local COMBINED="combined"
2119
# If the correct profile is not available,
2220
# try connecting the transmitter directly to the computer instead of through a USB hub.
@@ -38,7 +36,7 @@ audioconf() {
3836

3937
local DEV_ID
4038
local NODES
41-
NODES="$(pw-cli i all | grep "node.name")"
39+
NODES="$(pw-cli i all | grep "node.name" | sort)"
4240

4341
case "${1}" in
4442
all)
@@ -89,6 +87,9 @@ audioconf() {
8987
echo "Headphones device was not found."
9088
fi
9189
;;
90+
nodes)
91+
echo "${NODES}"
92+
;;
9293
optical | iec958 | IEC958)
9394
if grep -q "${Z2E_OPTICAL}" <<< "${NODES}"; then
9495
DEV_ID="$(pipewire_id "${Z2E_OPTICAL}")"

0 commit comments

Comments
 (0)