Skip to content

Instantly share code, notes, and snippets.

@gabochi
Created January 12, 2026 20:23
Show Gist options
  • Select an option

  • Save gabochi/b12cb4a63af0866454a85b61c697cad6 to your computer and use it in GitHub Desktop.

Select an option

Save gabochi/b12cb4a63af0866454a85b61c697cad6 to your computer and use it in GitHub Desktop.
dmenu oneliner for selecting audio output with wpctl
# adjust sinks number according to your available devices, mine are 4
wpctl set-default \
$(wpctl status \
| grep -A 4 'Sinks:' \
| grep -P '\d+\.' \
| dmenu -i -p "Select Audio Output:" \
| awk '{print $2}' \
| tr -d '.')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment