View Single Post
Posts: 30 | Thanked: 23 times | Joined on Nov 2010 @ Poland
#1610
Originally Posted by slarti View Post
Want Profilematic to do something when a certain bluetooth device connects/disconnects? Read this:

I got bored yesterday and was thinking about listening to dbus-signals (I assume everyone does exactly this when bored). I also happened to try connecting my N9 to my computer via bluetooth. As a result I came up with a sort of proof-of-concept script to get the bluetooth connected/disconnected rule working with Profilematic.

If you want to try it out, you'll need to apt-get install python python-dbus python-gobject (as root). Start the script (python /path/to/script.py (as user)), choose your options and leave it running in terminal. Try connecting/disconnecting the BT device being monitored and see what happens.

The script can be found here.

The script is fully functional but, at the moment, it needs to be started and given options in terminal. If people are interested, I might make it so that the options can be given through a config file or as arguments, so the script could be started on startup.

Please, tell me what you think and if it works for you.
Can you make that config file to this script?
 

The Following 2 Users Say Thank You to mr666acdc For This Useful Post: