From aba3bf542dde5e7df9014c829b8f0894dfebebc3 Mon Sep 17 00:00:00 2001 From: Ryan Kavanagh Date: Wed, 27 Sep 2017 15:53:19 -0400 Subject: Added scripts for managing audio --- .xinitrc | 4 ++-- Makefile | 2 +- SUBSTS | 4 ++-- bin/do_dac.sh | 3 +++ bin/mpd_only.sh | 2 ++ bin/mpd_others.sh | 4 ++++ bin/startaudio | 4 +++- 7 files changed, 17 insertions(+), 6 deletions(-) create mode 100755 bin/do_dac.sh create mode 100755 bin/mpd_only.sh create mode 100755 bin/mpd_others.sh diff --git a/.xinitrc b/.xinitrc index 615a370..bf71b68 100755 --- a/.xinitrc +++ b/.xinitrc @@ -8,8 +8,8 @@ trayer --tint black --edge top --SetDockType true --SetPartialStrut true \ ${HOME}/.dzen/battery.sh & urxvtd -q -f -o & urxvtc & -${HOME}/.screenlayout/nu-home.sh && nitrogen --restore -if [ "True" = "True" ]; then +${HOME}/.screenlayout/SCREENLAYOUT.sh && nitrogen --restore +if [ "PULSE" = "True" ]; then sh bin/startaudio & fi diff --git a/Makefile b/Makefile index 41ce867..973e98e 100755 --- a/Makefile +++ b/Makefile @@ -117,7 +117,7 @@ VARS_.nailrc = $(MAIL_PASS) HOMEDIR GMAIL_mailx_PASS VARS_.netrc = LOCAL_PASS GMAIL_PASS VARS_.offlineimaprc = $(MAIL_PASS) SSL_CERTS VARS_.screenrc = ZSH_PATH SCREEN_HOST_COLOUR -VARS_.xinitrc = SCREENLAYOUT REDSHIFT_MODE GSD_PATH PULSE_JACKD +VARS_.xinitrc = SCREENLAYOUT REDSHIFT_MODE GSD_PATH PULSE VARS_.xmonad/xmonad.hs = XMONAD_DZEN_W XMONAD_DZEN_X XMONAD_DZEN_Y VARS_.zsh/func/prompt_wunjo_setup = ZSH_HOST_COLOUR VARS_.zshrc = LOCALE SUBSTS_RM SUBSTS_LS MSMTP_PATH KEYCHAIN diff --git a/SUBSTS b/SUBSTS index 06b3efe..6fde853 100644 --- a/SUBSTS +++ b/SUBSTS @@ -77,9 +77,9 @@ GPG_BINARY gpg2 # /usr/lib/mutt/pgpewrap on Debian PGPEWRAP_BINARY /usr/lib/mutt/pgpewrap -# Start pulse and jackd? +# Start pulse? # Set to True to enable, anything else otherwise -PULSE_JACKD True +PULSE True HOMEDIR /home/rak diff --git a/bin/do_dac.sh b/bin/do_dac.sh new file mode 100755 index 0000000..55e8d3d --- /dev/null +++ b/bin/do_dac.sh @@ -0,0 +1,3 @@ +#!/bin/sh +pacmd set-card-profile alsa_card.usb-FiiO_DigiHug_USB_Audio-01 output:iec958-stereo +pacmd load-module module-ladspa-sink sink_name=binaural sink_master=alsa_output.usb-FiiO_DigiHug_USB_Audio-01.iec958-stereo plugin=bs2b label=bs2b control=700,4.5 diff --git a/bin/mpd_only.sh b/bin/mpd_only.sh new file mode 100755 index 0000000..6b905d9 --- /dev/null +++ b/bin/mpd_only.sh @@ -0,0 +1,2 @@ +#!/bin/sh +pacmd exit && mpc enable "DigiHug USB Audio" && mpd disable "My Pulse Output" diff --git a/bin/mpd_others.sh b/bin/mpd_others.sh new file mode 100755 index 0000000..28fb5e9 --- /dev/null +++ b/bin/mpd_others.sh @@ -0,0 +1,4 @@ +#!/bin/sh +mpc disable "DigiHug USB Audio" +mpc enable "My Pulse Output" +pacmd load-module module-udev-detect diff --git a/bin/startaudio b/bin/startaudio index 407c751..8880742 100755 --- a/bin/startaudio +++ b/bin/startaudio @@ -1,2 +1,4 @@ #!/bin/sh -start-pulseaudio-x11 && sleep 2 && sh ~/.jackdrc +start-pulseaudio-x11 +mpd_others.sh +do_dac.sh -- cgit v1.2.3