Notices


Reply
Thread Tools
Posts: 90 | Thanked: 35 times | Joined on Jan 2012
#61
Eventually got the installation done after much messing about (Thomas' option 2 was preferable to 1) - looks really good with Meecast :-)
 
Posts: 90 | Thanked: 35 times | Joined on Jan 2012
#62
Unfortunately my experience with python scripting is only fractionally over nil.
It would be very handy to have an indication whether BT is on or off to help avoid unnecessary battery drain.
Can anyone point me towards some python documentation that might help (or share any existing script)? Google is pointing me to stuff relating more to app development rather than simple scripting..
 
thp's Avatar
Posts: 1,391 | Thanked: 4,272 times | Joined on Sep 2007 @ Vienna, Austria
#63
Originally Posted by WhitP View Post
Can anyone point me towards some python documentation that might help (or share any existing script)?
That should help:

Code:
import dbus

bus = dbus.SystemBus()

bluez = bus.get_object('org.bluez', '/')
adapter_path = bluez.ListAdapters(
    dbus_interface='org.bluez.Manager')[0]
adapter = bus.get_object('org.bluez', adapter_path)
powered = adapter.GetProperties(
    dbus_interface='org.bluez.Adapter')['Powered']

if powered:
    print 'Bluetooth on'
else:
    print 'Bluetooth off'
You need to install (using apt-get install as root) the following packages: python python-dbus

Last edited by thp; 2012-12-21 at 09:34.
 

The Following User Says Thank You to thp For This Useful Post:
Posts: 55 | Thanked: 28 times | Joined on Jan 2010
#64
Originally Posted by WhitP View Post
Unfortunately my experience with python scripting is only fractionally over nil.
It would be very handy to have an indication whether BT is on or off to help avoid unnecessary battery drain.
Can anyone point me towards some python documentation that might help (or share any existing script)? Google is pointing me to stuff relating more to app development rather than simple scripting..
Also another solution is, you can install this app 'profileMatic' & set up rules when to turn on or off bluetooth. This will stop bothering about bluetooth status.

Link
http://talk.maemo.org/showthread.php?t=79642
 
Posts: 1 | Thanked: 0 times | Joined on Mar 2012 @ California
#65
Maybe for date mmddyy mm/dd/yy mm-dd-yy dd-mm-yy
so that the user can specify the format however they want just by using m's d's and y's

Im having a problem tho, I love this app, and I only wish it displayed correctly. I waited for the update, but it didnt fix my problem. Alligned left, it displays starting at the : colon below the clock, and cuts off whatever come off the screen. It moves around following the clock, with the tail cut off. I've already updated the software to 1.0.1. Anything I can run in the terminal to fix this? When I run nano on libsysuid-screenlock-nokia.css its empty. More details on that if necessary. Thanks THP for your development

10:59

07/06/20
Bat 89%
Online

^ That should display over to the right, a few pixels on the year's 0 are cut off
 
Moderator | Posts: 6,215 | Thanked: 6,400 times | Joined on Nov 2011
#66
for nano:

go to terminal
devel-su
(your password)
nano /usr/share/themes/base/meegotouch/libsysuid-screenlock-nokia/style/libsysuid-screenlock-nokia.css
now edit the file as you wish.
 
thp's Avatar
Posts: 1,391 | Thanked: 4,272 times | Joined on Sep 2007 @ Vienna, Austria
#67
Originally Posted by Boomboxx View Post
Maybe for date mmddyy mm/dd/yy mm-dd-yy dd-mm-yy
so that the user can specify the format however they want just by using m's d's and y's
Already implemented, will be available with the next update (new items to insert: Weekday name, Day of month, Month, Year). That should hopefully cover all cases

Originally Posted by Boomboxx View Post
Im having a problem tho, I love this app, and I only wish it displayed correctly. I waited for the update, but it didnt fix my problem. Alligned left, it displays starting at the : colon below the clock, and cuts off whatever come off the screen. It moves around following the clock, with the tail cut off. I've already updated the software to 1.0.1.
Did you reboot after the update (ideally with the charger unplugged, so that the device really shuts down). Switch it off without a charger connected, wait a bit, then turn it on. If you have installed the update, I can't see why it won't work (but would be glad to figure out the problem, so I can make the installation even more robust in the upcoming versions).
 
Posts: 90 | Thanked: 35 times | Joined on Jan 2012
#68
Originally Posted by achilles333 View Post
Also another solution is, you can install this app 'profileMatic' & set up rules when to turn on or off bluetooth. This will stop bothering about bluetooth status.

Link
http://talk.maemo.org/showthread.php?t=79642
I've been using Profilematic for a long time - it's one of my most important apps.
However I regularly use BT speakers for podcasts etc and I don't always remember to turn BT off!
 
Posts: 205 | Thanked: 159 times | Joined on Oct 2009
#69
@thp. Great app!

How did you get the calendar entries to appear as in http://www.flickr.com/photos/thp4/73...n/photostream/ ?

EDIT: ok i just saw that this is WIP. That'll teach me to not go through other people's photostream.

Last edited by mohannad; 2012-06-07 at 21:05.
 
Posts: 90 | Thanked: 35 times | Joined on Jan 2012
#70
Originally Posted by thp View Post
That should help:

Code:
import dbus

bus = dbus.SystemBus()

bluez = bus.get_object('org.bluez', '/')
adapter_path = bluez.ListAdapters(
    dbus_interface='org.bluez.Manager')[0]
adapter = bus.get_object('org.bluez', adapter_path)
powered = adapter.GetProperties(
    dbus_interface='org.bluez.Adapter')['Powered']

if powered:
    print 'Bluetooth on'
else:
    print 'Bluetooth off'
That works great - thanks!
Obviously it only updates when something else has changed but it will do the intended job. I have my Meecast update every 30mins so it'll do.
There's a strange line feed in there from the script but that might be due to me being lazy and creating the script file on my windows laptop.
 
Reply


 
Forum Jump


All times are GMT. The time now is 08:41.