Thread
:
[Announce] ProfileMatic for Harmattan
View Single Post
slarti
2014-02-09 , 10:00
Posts: 277 | Thanked: 319 times | Joined on Jan 2010
#
1569
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.
Last edited by slarti; 2014-02-09 at
10:06
.
Quote & Reply
|
The Following 3 Users Say Thank You to slarti For This Useful Post:
ajalkane
,
mr666acdc
,
smcsa
slarti
View Public Profile
Send a private message to slarti
Find all posts by slarti