Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- wn() {
- for pid in $(ps ax | grep afplay | grep -v grep | awk '{ print $1 }');
- do
- kill -9 $pid > /dev/null 2>&1;
- done;
- volume=$1;
- if [ -z $volume ]; then
- volume=1;
- else
- if [ $volume = "0" ]; then
- return;
- fi;
- fi;
- afplay $HOME/white-noise/white-noise.mp3 -t 100000 -v $volume &
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement