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)

thedead1440 2013-01-04 03:51

Re: [Support thread] Billboard Standby Screen
 
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...

herno24 2013-01-04 03:57

Re: [Support thread] Billboard Standby Screen
 
Quote:

Originally Posted by thedead1440 (Post 1310715)
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
~ $


thedead1440 2013-01-04 04:00

Re: [Support thread] Billboard Standby Screen
 
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


herno24 2013-01-04 04:11

Re: [Support thread] Billboard Standby Screen
 
Quote:

Originally Posted by thedead1440 (Post 1310719)
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
~ #


thedead1440 2013-01-04 04:15

Re: [Support thread] Billboard Standby Screen
 
could you uninstall dc then and try that one-line command?

herno24 2013-01-04 04:29

Re: [Support thread] Billboard Standby Screen
 
Quote:

Originally Posted by thedead1440 (Post 1310721)
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 2013-01-04 07:06

Re: [Support thread] Billboard Standby Screen
 
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


coderus 2013-01-04 07:15

Re: [Support thread] Billboard Standby Screen
 
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}"


slarti 2013-01-04 15:05

Re: [Support thread] Billboard Standby Screen
 
Quote:

Originally Posted by coderus (Post 1310747)
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.

slarti 2013-01-04 15:17

Re: [Support thread] Billboard Standby Screen
 
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?


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

vBulletin® Version 3.8.8