Notices


Reply
Thread Tools
Moderator | Posts: 6,215 | Thanked: 6,400 times | Joined on Nov 2011
#421
Type in terminal:
Code:
~ $ usage=$(gconftool -g /cellui/settings/datacounter/general/gprs_home_notification_period_UI) ; 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)) ; `dc $total $usage / p`
all of the above is one command so you can check the outcome which should be the output of the dc command...
 
Posts: 87 | Thanked: 14 times | Joined on Jan 2012
#422
Originally Posted by thedead1440 View Post
all of the above is one command so you can check the outcome which should be the output of the dc command...
Now i have this:
Code:
~$ usage=$(gconftool -g /cellui/settings/datacounter/general/gprs_home_notification_period_UI) ; tx=$(gconftool -g /cellui/settings/datacounter/transfer/gprs_home_tx_bytes) ; rx=$(gconfto
ol -g /cellui/settings/datacounter/transfer/gprs_home_rx_bytes) ; total=$(($tx+$rx)) ; `dc $total $usage / p`
dc: Could not open file 242418745
dc: Could not open file 1000000000
dc: Will not attempt to process directory /
dc: Could not open file p
~ $
 
Moderator | Posts: 6,215 | Thanked: 6,400 times | Joined on Nov 2011
#423
Can you check your libstdc++ 6 version? I don't understand why you had to install dc when it should IIRC be present by default... Maybe you want to remove what you installed first and check the terminal command to see if dc is not found?

Code:
~# dpkg -l | grep dc
ii  libstdc++6                                                     4.4.1-0maemo14+0m6                                             The GNU Standard C++ Library v3
 
Posts: 87 | Thanked: 14 times | Joined on Jan 2012
#424
Originally Posted by thedead1440 View Post
Can you check your libstdc++ 6 version?
I have this:
Code:
~# dpkg -l | grep dc
ii  advancedcallrecorder         1.0.0 Advanced Call Recorder for Meego
ii  dc 1.06.95-2+maemo9+0m6   The GNU dcarbitrary precision reverse-polish calculator
ii  libstdc++6  4.4.1-0maemo14+0m6   The GNU Standard C++ Library v3
~ #
 
Moderator | Posts: 6,215 | Thanked: 6,400 times | Joined on Nov 2011
#425
could you uninstall dc then and try that one-line command?

Last edited by thedead1440; 2013-01-04 at 04:18.
 
Posts: 87 | Thanked: 14 times | Joined on Jan 2012
#426
Originally Posted by thedead1440 View Post
could you uninstall dc then and try that one-line command?
Unninstaled via apt-get remove dc and now i have this:
Code:
~ # dpkg -l | grep dc
ii  advancedcallrecorder                    1.0.0 Advanced Call Recorder for Meego
rc  dc       1.06.95-2+maemo9+0m6        The GNU dcarbitrary precision reverse-polish calculator
ii  libstdc++6                    4.4.1-0maemo14+0m6 The GNU Standard C++ Library v3
~ #
 
coderus's Avatar
Posts: 6,436 | Thanked: 12,699 times | Joined on Nov 2011 @ Ängelholm, Sweden
#427
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
__________________
Telegram | Openrepos | GitHub | Revolut donations
 

The Following User Says Thank You to coderus For This Useful Post:
coderus's Avatar
Posts: 6,436 | Thanked: 12,699 times | Joined on Nov 2011 @ Ängelholm, Sweden
#428
Script for force updating Billboard data when locking screen. Should be used with profilematic idle rule as activate script.
Code:
#!/bin/sh
#profilematic idle enter script

text=$(gconftool -g /apps/billboard/text)
gconftool -s -t string /apps/billboard/text "{{white}}Billboard"
gconftool -s -t string /apps/billboard/text "${text}"
__________________
Telegram | Openrepos | GitHub | Revolut donations
 

The Following 5 Users Say Thank You to coderus For This Useful Post:
Posts: 277 | Thanked: 319 times | Joined on Jan 2010
#429
Originally Posted by coderus View Post
Script for force updating Billboard data when locking screen. Should be used with profilematic idle rule as activate script.
Code:
#!/bin/sh
#profilematic idle enter script

text=$(gconftool -g /apps/billboard/text)
gconftool -s -t string /apps/billboard/text "{{white}}Billboard"
gconftool -s -t string /apps/billboard/text "${text}"
Very clever and useful, thanks.

Might be worth mentioning that the idle rule in profilematic should be set for 0 minutes. I also changed the "{{white}}Billboard" -part to "{{white}}Updating Billboard..." to be a little more informative, even though I only saw it once.
 
Posts: 277 | Thanked: 319 times | Joined on Jan 2010
#430
Weird thing, {song!No song} isn't working for me anymore. "No song" is shown when the property is empty but nothing is shown if a song is playing. Anyone else experiencing this?
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 15:46.