jackmenu 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #! /bin/mksh
  2. . $(realpath "$0" | xargs dirname)/../menu/dmenuconf
  3. EXCON="jack_connect"
  4. EXDISCON="jack_disconnect"
  5. PulseClient="PulseAudio JACK Source-01"
  6. MicClient="ardour:MicFiltered"
  7. KbdClient="ardour:MidiFiltered"
  8. DdbClient="deadbeef"
  9. PulseClientL="${PulseClient}:front-left"
  10. PulseClientR="${PulseClient}:front-right"
  11. MicClientOutL="${MicClient}/audio_out 1"
  12. MicClientOutR="${MicClient}/audio_out 2"
  13. KbdClientOutL="${KbdClient}/audio_out 1"
  14. KbdClientOutR="${KbdClient}/audio_out 2"
  15. DdbClientOutL="${DdbClient}:deadbeef_1"
  16. DdbClientOutR="${DdbClient}:deadbeef_2"
  17. DLIST="\
  18. mic-pulse-connect
  19. mic-pulse-disconnect
  20. deadbeef-pulse-connect
  21. deadbeef-pulse-disconnect
  22. midi-pulse-connect
  23. midi-pulse-disconnect
  24. "
  25. AAA="$(echo -e "$DLIST" | dmenu -i -b -p WINE -nb "$DMENUBG" -nf "$DMENUFG" -sb "$DMENUFG" -sf "$DMENUBG" -fn "$DMENUFONT")"
  26. case "$AAA" in
  27. "mic-pulse-connect") $EXCON "$MicClientOutL" "$PulseClientL" && $EXCON "$MicClientOutR" "$PulseClientR" ;;
  28. "mic-pulse-disconnect") $EXDISCON "$MicClientOutL" "$PulseClientL" && $EXDISCON "$MicClientOutR" "$PulseClientR" ;;
  29. "deadbeef-pulse-connect") $EXCON "$DdbClientOutL" "$PulseClientL" && $EXCON "$DdbClientOutR" "$PulseClientR" ;;
  30. "deadbeef-pulse-disconnect") $EXDISCON "$DdbClientOutL" "$PulseClientL" && $EXDISCON "$DdbClientOutR" "$PulseClientR" ;;
  31. "midi-pulse-connect") $EXCON "$KbdClientOutL" "$PulseClientL" && $EXCON "$KbdClientOutR" "$PulseClientR" ;;
  32. "midi-pulse-disconnect") $EXDISCON "$KbdClientOutL" "$PulseClientL" && $EXDISCON "$KbdClientOutR" "$PulseClientR" ;;
  33. esac
  34. exit 0