maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Support thread] Billboard Standby Screen (https://talk.maemo.org/showthread.php?t=84507)

coderus 2013-01-04 18:07

Re: [Support thread] Billboard Standby Screen
 
data counters in settings - device - counters. set limit to 300.

herno24 2013-01-04 18:14

Re: [Support thread] Billboard Standby Screen
 
Yes, now it works!!.

coderus 2013-01-04 18:26

Re: [Support thread] Billboard Standby Screen
 
lol, good :D

slarti 2013-01-04 22:01

Re: [Support thread] Billboard Standby Screen
 
One more:

I modified the bluetooth status script to show the correct icon for connected or disconnected states. No icon is shown when BT is off.

Code:

#!/usr/bin/python
# Print bluetooth status icon off/disconnected/connected

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']
btstatus = bus.get_object('com.nokia.policy.pcfd', '/com/nokia/policy/bluetooth_override')
connected = btstatus.Get(dbus_interface='org.maemo.contextkit.Property')[0]

if powered:
    if 'default' in connected:
        print '<</usr/share/themes/blanco/meegotouch/icons/icon-s-status-bluetooth-active.png>>'
    else:
        print '<</usr/share/themes/blanco/meegotouch/icons/icon-s-status-bluetooth.png>>'


herno24 2013-01-05 03:01

Re: [Support thread] Billboard Standby Screen
 
Ok, for gprs i think we need a script (i don't know how to do it) to reset the counter automatically every month. What do you think about this?.

coderus 2013-01-05 07:16

Re: [Support thread] Billboard Standby Screen
 
can be done by Timed script

coderus 2013-01-05 08:15

Re: [Support thread] Billboard Standby Screen
 
bluetooth icon shell script:
Code:

#!/bin/sh

powered=$(qdbus --system org.bluez $(qdbus --literal --system org.bluez / org.bluez.Manager.ListAdapters | sed -re "s/.*(\/org\/bluez\/[0-9]{4}\/hci0).*/\1/") org.bluez.Adapter.GetProperties $
connected=$(qdbus --system com.nokia.policy.pcfd /com/nokia/policy/bluetooth_override org.maemo.contextkit.Property.Get | sed -n 1p)
if [ "$powered" == "true" ]; then
        if [ "$connected" == "default" ]; then
                echo -n "<</usr/share/themes/blanco/meegotouch/icons/icon-s-status-bluetooth-active.png>>"
        else
                echo -n "<</usr/share/themes/blanco/meegotouch/icons/icon-s-status-bluetooth.png>>"
        fi
fi


EmaNymton 2013-01-05 09:25

Re: [Support thread] Billboard Standby Screen
 
Quote:

Originally Posted by herno24 (Post 1311058)
Ok, for gprs i think we need a script (i don't know how to do it) to reset the counter automatically every month. What do you think about this?.

Use the script with profilematic to check everyday if it's the day to reset. Not fully tested, before using it see your values with
Code:

gconftool-2 -R /cellui/settings/datacounter
and save it somewhere so you can manually recover.

Code:

#!/bin/sh
# reset the data counter on a selected reset day

reset_day="05" # change to your needs
day_of_month=$(date +"%d")
datetime=$(date +"%d.%m.%Y.%s")

if [ $reset_day = $day_of_month ]
then
gconftool -s --type string /cellui/settings/datacounter/transfer/gprs_home_tx_bytes "0"
gconftool -s --type string /cellui/settings/datacounter/transfer/gprs_home_rx_bytes "0"
gconftool -s --type string /cellui/settings/datacounter/general/gprs_home_last_reset $datetime
fi


slarti 2013-01-05 09:36

Re: [Support thread] Billboard Standby Screen
 
Quote:

Originally Posted by EmaNymton (Post 1311100)
Use the script with profilematic to check everyday if it's the day to reset.

Or set a calendar entry that repeats once a month and use ProfileMatic's calendar rule.

EmaNymton 2013-01-05 09:39

Re: [Support thread] Billboard Standby Screen
 
Quote:

Originally Posted by slarti (Post 1311102)
Or set a calendar entry that repeats once a month and use ProfileMatic's calendar rule.

thanks, didn't know that profilematic can do this, then you can trim the script to


Code:

#!/bin/sh
# reset the data counter
datetime=$(date +"%d.%m.%Y.%s")
gconftool -s --type string /cellui/settings/datacounter/transfer/gprs_home_tx_bytes "0"
gconftool -s --type string /cellui/settings/datacounter/transfer/gprs_home_rx_bytes "0"
gconftool -s --type string /cellui/settings/datacounter/general/gprs_home_last_reset $datetime



All times are GMT. The time now is 20:56.

vBulletin® Version 3.8.8