You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
488 B
23 lines
488 B
#!/bin/bash |
|
|
|
filetype="wav" |
|
#filename="record_$(date +%H_%M_%m_%d_%Y)" |
|
directory="$HOME/Musica/recordings/" |
|
|
|
if ! [ -d "$directory" ]; |
|
then |
|
mkdir "$directory" |
|
fi |
|
|
|
if [[ $1 == "start" ]] && [[ $# -eq 2 ]] |
|
then |
|
filename=$2 |
|
notify-send "Recording started" |
|
amixer sset 'Capture' 35% |
|
exec arecord -f cd -d 3600 -t wav |lame --preset 56 -mm - "$directory""$filename" & |
|
elif [[ $1 == "stop" ]] |
|
then |
|
pkill -f "arecord" && notify-send "Recording stopped" |
|
fi |
|
|
|
|
|
|