View Single Post
qwazix's Avatar
Moderator | Posts: 2,622 | Thanked: 5,447 times | Joined on Jan 2010
#3
dbus-scripts ftw!

I installed dbus-scripts, created a control file /etc/dbus-scripts.d/onWifiConnect with this contents

Code:
/home/user/onWifiConnect.sh * * com.nokia.icd status_changed * WLAN_INFRA CONNECTED
/home/user/onWifiDisconnect.sh * * com.nokia.icd status_changed * WLAN_INFRA IDLE
and two scripts in /home/user

onWifiConnnect.sh

Code:
#!/bin/sh
dbus-send --system --type=method_call --dest=com.nokia.phone.SSC /com/nokia/phone/SSC com.nokia.phone.SSC.set_radio boolean:false
onWifiDisconnect.sh
Code:
#!/bin/sh
dbus-send --system --type=method_call --dest=com.nokia.phone.SSC /com/nokia/phone/SSC com.nokia.phone.SSC.set_radio boolean:true
__________________
Proud coding competition 2012 winner: ρcam
My other apps: speedcrunch N9 N900 Jolla –– contactlaunch –– timenow

Nemo UX blog: Grog
My website: qwazix.com
My job: oob
 

The Following 4 Users Say Thank You to qwazix For This Useful Post: