diff options
author | David Runge <dave@sleepmap.de> | 2017-06-26 15:15:18 +0200 |
---|---|---|
committer | David Runge <dave@sleepmap.de> | 2017-06-26 15:15:18 +0200 |
commit | bd16148e70be4b2a98928016a6d380ad48111c12 (patch) | |
tree | 9972fa84d39d1eb8d4ce7412e650290d857d1652 /bin | |
parent | dc15bc9bc5fbea35937b9dc6103c96d736ba554c (diff) | |
parent | ffcf2ac4656ab3100c4b662a561b7f44a21c4a77 (diff) | |
download | dotfiles-bd16148e70be4b2a98928016a6d380ad48111c12.tar.gz dotfiles-bd16148e70be4b2a98928016a6d380ad48111c12.tar.bz2 dotfiles-bd16148e70be4b2a98928016a6d380ad48111c12.tar.xz dotfiles-bd16148e70be4b2a98928016a6d380ad48111c12.zip |
Merge branch 'master' of sleepmap.de:config/dotfiles
* 'master' of sleepmap.de:config/dotfiles:
.xprofile: Removing setting of de layout as default.
.ssh/config: Adding studio related configs. Renaming github.com shortcut to github.
bin/pulse2jack: Adding script to create and default JACK sink for pulse. Can also unload the modules again.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/pulse2jack | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/bin/pulse2jack b/bin/pulse2jack new file mode 100755 index 0000000..73ede01 --- /dev/null +++ b/bin/pulse2jack @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +set -euo pipefail +IFS=$'\n\t' + + +function jack_module_on() +{ + echo "Enabling JACK sink and source." + /usr/bin/pacmd load-module module-jack-sink channels=2 + /usr/bin/pacmd load-module module-jack-source channels=2 + /usr/bin/pacmd set-default-sink jack_out + /usr/bin/pacmd set-default-source jack_in +} + +function jack_module_off() +{ + echo "Disabling JACK sink and source." + /usr/bin/pacmd unload-module module-jack-sink + /usr/bin/pacmd unload-module module-jack-source +} + +case "$1" in + "on") + jack_module_on + ;; + "off") + jack_module_off + ;; +esac + +exit 0 |