| The Following User Says Thank You to coderus For This Useful Post: | ||
|
|
2013-01-04
, 15:30
|
|
Posts: 277 |
Thanked: 319 times |
Joined on Jan 2010
|
#432
|
|
|
2013-01-04
, 15:32
|
|
Posts: 87 |
Thanked: 14 times |
Joined on Jan 2012
|
#433
|
i have no idea why you not using shell as well as external tools
Code:#!/bin/sh # Warn in red if data left <20% # Data usage in cyan if data left not <20% tx=$(gconftool -g /cellui/settings/datacounter/transfer/gprs_home_tx_bytes) rx=$(gconftool -g /cellui/settings/datacounter/transfer/gprs_home_rx_bytes) total=$(($tx+$rx)) usage=$(gconftool -g /cellui/settings/datacounter/general/gprs_home_notification_period_UI) totalMB=$((($tx+$rx)/1000000)) amount=$(($total*100/$usage)) if [ $amount -ge 80 ] then echo {{red}}"Data left < 20%" else echo {{cyan}}"Data used = $totalMB MB" fi
|
|
2013-01-04
, 16:00
|
|
Posts: 87 |
Thanked: 14 times |
Joined on Jan 2012
|
#435
|
|
|
2013-01-04
, 17:04
|
|
Posts: 87 |
Thanked: 14 times |
Joined on Jan 2012
|
#437
|
|
|
2013-01-04
, 17:33
|
|
|
Posts: 6,431 |
Thanked: 12,683 times |
Joined on Nov 2011
@ Open Mobile Platform, Innopolis, Russia
|
#438
|
| The Following User Says Thank You to coderus For This Useful Post: | ||
|
|
2013-01-04
, 17:36
|
|
Posts: 87 |
Thanked: 14 times |
Joined on Jan 2012
|
#439
|
|
|
2013-01-04
, 17:51
|
|
Posts: 87 |
Thanked: 14 times |
Joined on Jan 2012
|
#440
|
get my script here: https://dl.dropbox.com/u/26659227/harmattan/data.sh
.
| The Following User Says Thank You to herno24 For This Useful Post: | ||
Twitter | Openrepos | GitHub | PayPal.Me