The Following User Says Thank You to coderus For This Useful Post: | ||
|
2013-01-04
, 18:26
|
|
Posts: 6,436 |
Thanked: 12,701 times |
Joined on Nov 2011
@ Ängelholm, Sweden
|
#443
|
|
2013-01-04
, 22:01
|
Posts: 277 |
Thanked: 319 times |
Joined on Jan 2010
|
#444
|
#!/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>>'
|
2013-01-05
, 03:01
|
Posts: 87 |
Thanked: 14 times |
Joined on Jan 2012
|
#445
|
|
2013-01-05
, 07:16
|
|
Posts: 6,436 |
Thanked: 12,701 times |
Joined on Nov 2011
@ Ängelholm, Sweden
|
#446
|
|
2013-01-05
, 08:15
|
|
Posts: 6,436 |
Thanked: 12,701 times |
Joined on Nov 2011
@ Ängelholm, Sweden
|
#447
|
#!/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
The Following User Says Thank You to coderus For This Useful Post: | ||
|
2013-01-05
, 09:25
|
|
Posts: 141 |
Thanked: 267 times |
Joined on May 2010
@ Germany
|
#448
|
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?.
gconftool-2 -R /cellui/settings/datacounter
#!/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
The Following 2 Users Say Thank You to EmaNymton For This Useful Post: | ||
|
2013-01-05
, 09:36
|
Posts: 277 |
Thanked: 319 times |
Joined on Jan 2010
|
#449
|
The Following User Says Thank You to slarti For This Useful Post: | ||
|
2013-01-05
, 09:39
|
|
Posts: 141 |
Thanked: 267 times |
Joined on May 2010
@ Germany
|
#450
|
Or set a calendar entry that repeats once a month and use ProfileMatic's calendar rule.
#!/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
The Following User Says Thank You to EmaNymton For This Useful Post: | ||
Telegram | Openrepos | GitHub | Revolut donations