![]() |
[WIP] Custom Ambience System
I tried to create a more elaborated Ambience system -- just changing the background and ringtones gets rather dull after a while. My first small steps are documented on TJC. I also got a lot of inspiration from the "Tinkering with DBUS" thread here on TMO.
Now I that I got the whole thing to work, I thought I'd share it with you. Please note that this still involves rather a lot of console work. At the heart of this custom ambience system is the following python script, let's call it custom_ambiences.py. This script first executes boot.sh (so that you can run something when your Jolla starts up), and then listens to the DBIS and executes $TOHID.sh when a TOH is attached. Besides that, it executes [I]$AMBIENCE_NAME[I].sh when a new ambience is selected. It looks for those scripts in /home/nemo/scripts. The content of /home/nemo/scripts/custom_ambiences.py: PHP Code:
PHP Code:
PHP Code:
(I took this also from TJC) And then you're good to go! Some cool things you can do with this:
If you have any other ideas, I'd be glad to hear them. |
Re: [WIP] Custom Ambience System
Jolla is working with some extensions to ambiance framework with Rovio and their Angry Birds TOH. I do not know when those will be available in OS or if those already are.
I like this custom Ambience system idea. However in my opinion it should be installed properly under /usr and so that it would be possible to still create ambience rpms fully compatible with native ambiance support but with extensions this custom system would provide. I do not support such short cutting solutions which alter system files or other applications files as those are like asking for troubles and average joe will only break his OS with those sooner or later. Would be nice target to have a framework with custom-ambience-server and custom-ambience-gui to manage them, guidelines howto to create custom features into ambience packages, how those shall be installed into system so that custom framework will recognize those, common configuration guidelines for those (gconf?) etc... I might be interested to contribute to such activity too. Currently I am too busy with custom keyboard framework and one commercial project but after those may be. |
Re: [WIP] Custom Ambience System
Would it be possible to set a custom ambiance from an app (or terminal command) for those of us with an N9 or other device that doesn't support Other Halfs?
|
Re: [WIP] Custom Ambience System
Can't you just set any ambiance from UI as in Jolla if you are running Sailfish OS in your device?
|
Re: [WIP] Custom Ambience System
Quote:
|
Re: [WIP] Custom Ambience System
With that script may be, but it could be changed so that any ambience change triggers extensions too. Good start in that script but as I wrote IMO should be extended to more robust custom ambience framework.
|
Re: [WIP] Custom Ambience System
gehowa, thank for this command:
Code:
dbus-send --session --print-reply --dest=com.jolla.ambienced /com/jolla/ambienced com.jolla.ambienced.setAmbience string:"file://path/to/ambience" |
Re: [WIP] Custom Ambience System
Can someone tell me how to check with dbus command which ambience active now ?
I found only this way to see the name of active ambience... :o: Code:
grep 'ambience' /home/nemo/.gconf/desktop/meego/background/portrait/%gconf.xml|cut -d '/' -f6|cut -d '<' -f1 |
Re: [WIP] Custom Ambience System
Not dbus but...
Execute as nemo user: Code:
gconftool-2 --get /desktop/meego/background/portrait/picture_filename Code:
su - nemo -c "gconftool-2 --get /desktop/meego/background/portrait/picture_filename" |
Re: [WIP] Custom Ambience System
Thanks, it shorter than my :D
|
All times are GMT. The time now is 00:52. |
vBulletin® Version 3.8.8