View Single Post
bibek's Avatar
Posts: 368 | Thanked: 826 times | Joined on May 2012 @ India
#39
I got the data toggle working, but trying to make it interactive like the LPM isn't working.
Wanted to skip the notification, as it slows down ui during popup. And tried to change the icon name.
Getting errors in syntax and all types of mess.

thedead1440 can you package something like the lpm toggle?

Some Icons attached, in case you need.. from alternative icons thread http://talk.maemo.org/showthread.php?t=85769

Here's my code(not working)
#icon name is Data On
Code:
#!/bin/sh

# Toggle WLAN radio state

STATUS=$(/sbin/mcetool --status | grep -v grep | grep WLAN | awk '{print $2}' | head -1)

if [ $STATUS == "enabled" ]
	then
	sed -i 'On/Off/' /home/user/.local/share/applications/netToggle.desktop
	`/sbin/mcetool --disable-radio=wlan`
	else
	dbus-send --print-reply --dest=com.meego.core.MNotificationManager /notificationmanager com.meego.core.MNotificationManager.addNotification uint32:0 uint32:0 string:'device' string:'' string:"WLAN On" string:'' string:'' uint32:0
	`/sbin/mcetool --enable-radio=wlan`
fi
Attached Images
  
__________________
Blob | ClipBook | Qcal | DoMee | ShareBoard | TMO Forum App

Last edited by bibek; 2013-02-26 at 08:05.