maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   Random SMS sound (https://talk.maemo.org/showthread.php?t=90210)

taixzo 2014-04-05 04:51

Re: Random SMS sound
 
Why not just make the SMS sound silence? Then you don't need a click sound.

dr_frost_dk 2014-04-05 17:36

Re: Random SMS sound
 
Success with the method of changing next SMS sound.

Code:

#! /bin/sh
dbus-monitor --system interface='Phone.SMS',member='incoming' | while grep -q array
do
echo "SMS recieved"
sleep 1
songdir="/home/user/MyDocs/.sounds/SMS-Random/"
a=$(ls "$songdir" -1 | awk 'BEGIN{srand()} {x[NR] = $0} END{print "", x[1 + int(rand() * NR)]}' | sed 's/^ *//')
sleep 5
cp "$songdir""$a" /home/user/.local/share/sounds/Message1.aac.wav
done

Select "Message1" as ringtone, 1 sms will have the stock tone, every other will have random sounds from defined folder, now just need to make a startup script so i don't have an open terminal all the time :)


All times are GMT. The time now is 10:00.

vBulletin® Version 3.8.8