Active Topics

 


Reply
Thread Tools
bibek's Avatar
Posts: 368 | Thanked: 826 times | Joined on May 2012 @ India
#31
Would it be a wrong place to ask for a Mobile Data toggle? Based on this : http://talk.maemo.org/showpost.php?p...&postcount=983

i messed around for some time, but couldn't get the desktop file working :/
 
Moderator | Posts: 6,215 | Thanked: 6,400 times | Joined on Nov 2011
#32
bibek,

Your wish is my command

Here you go:

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
	dbus-send --print-reply --dest=com.meego.core.MNotificationManager /notificationmanager com.meego.core.MNotificationManager.addNotification uint32:0 uint32:0 string:'device' string:'' string:"WLAN Off" string:'' string:'' uint32:0
	`/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
Save the above as /home/user/wlan.sh or anything to your heart's content...


Then for the .desktop file:

Code:
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=false
Name=Toggle WLAN
Exec=/bin/sh /home/user/wlan.sh
Icon=
X-Window-Icon=
X-HildonDesk-ShowInToolbar=true
X-Osso-Type=application/x-executable
save it as /home/user/.local/share/applications/toggle-wlan.desktop or anything you like and it is good to go

Icons not added; you can add them if you want to...
 

The Following 5 Users Say Thank You to thedead1440 For This Useful Post:
Posts: 63 | Thanked: 75 times | Joined on Jul 2012 @ Austria
#33
Does anyone know where I should start looking, if I wanted to disable/enable the LPM screen bases on available notifications?
The "condition" I am looking for is the presence of a new call/sms/etc notification (which leads to a LPM notification symbol). I'd really appreciate any help or input as to where I can find/query this "condition".
 

The Following User Says Thank You to N9uwu For This Useful Post:
Win7Mac's Avatar
Community Council | Posts: 664 | Thanked: 1,648 times | Joined on Apr 2012 @ Hamburg
#34
Usually, I switch powersave mode to achieve almost the same.
Here are some leaked protos of icons...
Ideas to add some beauty are very welcome.
Attached Images
  
__________________
Nokia 5110 > 3310 > 6230 > N70 > N9 BLACK 64GB
Hildon Foundation Board member
Maemo Community e.V. co-creator, founder and director since Q4/2016
Current Maemo Community Council member
 

The Following User Says Thank You to Win7Mac For This Useful Post:
Posts: 359 | Thanked: 322 times | Joined on Jun 2010
#35
Originally Posted by Win7Mac View Post
v1.1.1 is online. Thanks thedead1440!
Only difference to v1.1: the above icons are included.
The .deb can be gotten here.
Enjoy.
thedead1440 -- the link to the .deb for version 1.1.1 of the lpm toggle is 404'ing on me (same with the link in the first post). Could you please take a look and hook up a new link? Thanks.
 
Win7Mac's Avatar
Community Council | Posts: 664 | Thanked: 1,648 times | Joined on Apr 2012 @ Hamburg
#36
Originally Posted by Hacker View Post
the link to the .deb for version 1.1.1 of the lpm toggle is 404'ing on me.
Fixed now.
__________________
Nokia 5110 > 3310 > 6230 > N70 > N9 BLACK 64GB
Hildon Foundation Board member
Maemo Community e.V. co-creator, founder and director since Q4/2016
Current Maemo Community Council member
 

The Following User Says Thank You to Win7Mac For This Useful Post:
Posts: 649 | Thanked: 762 times | Joined on Mar 2012 @ Ohio
#37
Originally Posted by bibek View Post
Would it be a wrong place to ask for a Mobile Data toggle? Based on this : http://talk.maemo.org/showpost.php?p...&postcount=983

i messed around for some time, but couldn't get the desktop file working :/
I can't get mcetools to install. I tried apt-get and the provided deb. I get an error in terminal with the apt-get and i get an invalid installation package error from the deb. Any help?
 
Moderator | Posts: 6,215 | Thanked: 6,400 times | Joined on Nov 2011
#38
Originally Posted by imaginaryenemy View Post
I can't get mcetools to install. I tried apt-get and the provided deb. I get an error in terminal with the apt-get and i get an invalid installation package error from the deb. Any help?
You have to incept the package or use fixed origin if in open mode...
 
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.
 
Moderator | Posts: 6,215 | Thanked: 6,400 times | Joined on Nov 2011
#40
bibek,

Get toggle-wlan from here...

If you want the version without the dbus calls get v1.0-1 from here...

You can read the scripts here

Last edited by thedead1440; 2013-01-21 at 12:14. Reason: typo
 

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

Thread Tools

 
Forum Jump


All times are GMT. The time now is 11:00.