![]() |
N900: Can profile type be determined in a shell script?
Is there a command line entry that returns a value that can be used to determine if the N900 is in Silent or General profile?
I am using a timed shell script which calls play-sound to play clock chimes, the disadvantage of which is that play-sound will always play, even when the phone's profile is set to Silent. I need something to exit or otherwise control the shell script, along the lines of if { IsProfileSilent() == true } exit; |
Re: N900: Can profile type be determined in a shell script?
cat /home/user/.profiled/current
Returns "silent" or "general". |
Re: N900: Can profile type be determined in a shell script?
Did you try, if TimedSilencer can do 'something' for you?
|
Re: N900: Can profile type be determined in a shell script?
|
Re: N900: Can profile type be determined in a shell script?
Quote:
How would I capture & compare that string returned within a shell script? I am not very familiar with shell scripting. ----- Quote:
vi_ : Thank you. I see that Code:
dbus-send --type=method_call --print-reply --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.get_profile I think in this case only the "silent" or "general" returned by Code:
cat /home/user/.profiled/current |
Re: N900: Can profile type be determined in a shell script?
Something like:
Code:
if [ `cat /home/user/.profiled/current` == "Outdoors" ]; then echo "Not inside";fi |
Re: N900: Can profile type be determined in a shell script?
Thank you all; it seems to have worked with
Code:
if [ `cat /home/user/.profiled/current` == "silent" ]; then |
All times are GMT. The time now is 16:36. |
vBulletin® Version 3.8.8