-
Notifications
You must be signed in to change notification settings - Fork 0
/
music.temp
30 lines (30 loc) · 819 Bytes
/
music.temp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
export sink=1
pulseaudio --check >> nul
pulseaudio -k >> nul
pulseaudio -D >> nul
pactl list short sinks >> nul
pacmd set-default-sink $sink >> nul
export volume=$(expr 65536 / $mult)
pacmd set-sink-volume $sink $volume >> nul
amixer set Master unmute >> nul
echo 1 >> nul
screen -dmS pl sh play.sh
while [ 1 ]; do
if [[ $(pgrep -x "plasmashell") != "" ]]
then
export vol=$volume
export step=$(expr $volume / 20)
echo "INIT: $vol | STEP: $step" > 1.log
export xv=0
while [ $xv != 20 ]; do
pacmd set-sink-volume $sink $vol
export vol=$(expr $vol - $step)
export xv=$(expr $xv + 1)
sleep 0.1
echo "->{$vol}<-" >> 1.log
done
sudo screen -X -S pl quit
killall music
exit
fi
done