-
-
Save RobertAudi/464586 to your computer and use it in GitHub Desktop.
Save that code in a file called moc and put it somewhere in your $PATH
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # /!\ WARNING /!\ | |
| # --------------- | |
| # DO NOT PUT THE CONTENTS OF THIS SCRIPT INTO | |
| # A FUNCTION OR ELSE MOC WILL STOP RUNNING AS | |
| # SOON AS YOU CLOSE THE TERMINAL WINDOW IN WHICH | |
| # IT WAS FIRST LAUNCHED!! | |
| number=$(ps aux | grep jackd | grep -v grep | wc -l) | |
| # if jackd is not running, launch it because moc needs it. | |
| # the -T option makes sure that jack quits when mocp quits | |
| # so that it doesn't eat up cpu for nothing | |
| if [[ ! $number -gt 0 ]] | |
| then | |
| jackd -T -d coreaudio &> /dev/null & | |
| fi | |
| mocp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment