Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    Desktop Command Execution Widget scripts

    Reply
    Page 11 of 42 | Prev |   9     10   11   12     13   21 | Next | Last
    Palleman | # 101 | 2010-01-28, 17:13 | Report

    God was written in awk.

    Here's your internal and external IP (they might be identical):
    Code:
    echo `/sbin/ifconfig | grep inet | grep -v 127.0.0.1 | awk '{split($2,a,":");print a[2]}'` / `wget -q -O - api.myiptest.com | awk -F "\"" '{print $4}'`
    /P

    Edit | Forward | Quote | Quick Reply | Thanks

     
    feydrutha | # 102 | 2010-01-28, 17:33 | Report

    Originally Posted by jakiman View Post
    Here's a script I'm using for Rootfs usage info. Hope someone finds it useful.
    Very nice. But I have switched it to df -k so I get more precise info on how much space an app eats up. This way testing an app for optification becomes more or less trivial... with this on my desktop I will notice right away if an app eats up too much space.

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by feydrutha; 2010-01-28 at 17:37.

     
    jakiman | # 103 | 2010-01-28, 19:37 | Report

    Originally Posted by Palleman View Post
    Here's a proposal for a new batt-level cmd line:
    Code:
    if `hal-device | grep is.charging | awk '{print $3}'`; then echo Charging; else hal-device | grep charge_level.percentage | awk '{print $3 "%"}'; fi
    I made mine 16 wide and changed "Battery:" to "Batt" and "Charging" to "Chrg", making it smaller.
    Nice. Might try it out. But use lshal instead of hal-device as lshal is much quicker.

    I'm very happy to some more scripts others are using. Let's keep them coming!

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Palleman | # 104 | 2010-01-29, 00:54 | Report

    Originally Posted by jakiman View Post
    Nice. Might try it out. But use lshal instead of hal-device as lshal is much quicker.
    Isn't it the other way around? At least on my phone it is. lshal takes about five seconds, while hal-device takes about three seconds.

    Edit: Measured it with time a couple of times:

    lshal:
    3,82
    3,53
    3,58
    3,90
    3,47

    hal-device
    2,32
    2,30
    2,24
    2,56
    2,55

    I wasn't that good at counting seconds, but at least I got the proportions right...

    /P

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by Palleman; 2010-01-29 at 01:06.

     
    jakiman | # 105 | 2010-01-29, 01:05 | Report

    Originally Posted by Palleman View Post
    Isn't it the other way around? At least on my phone it is. lshal takes about five seconds, while hal-device takes about three seconds.
    lol. I was half asleep when I wrote that I think. Yeah, it's the other way around.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    jkq | # 106 | 2010-01-29, 01:58 | Report

    Originally Posted by jakiman View Post
    But use lshal instead of hal-device as lshal is much quicker.
    Try "hal-device bme".

    real 0m0.149s
    user 0m0.000s
    sys 0m0.008s

    -jkq

    Edit | Forward | Quote | Quick Reply | Thanks

     
    ViciousXUSMC | # 107 | 2010-01-29, 05:27 | Report

    Originally Posted by jakiman View Post
    Here's a script I'm using for Rootfs usage info. Hope someone finds it useful.

    Title: Rootfs Usage:

    Code:
    df -h | grep ubi0 | awk '{print $5,"used",",",$4"B","free"}'
    example output:

    Rootfs Usage: 82% used , 40.9MB free
    thanks using it now, this can be a life saving.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    BugHunter | # 108 | 2010-01-29, 16:59 | Report

    Noob here.

    Thanks a lot for this widget and helpful scripts to all.

    I have a few suggestions:

    1.
    Just wandering if you would consider creating dedicated page with list of scripts and descriptions what are they for (for noobs like me).

    For example:

    "Rootfs Usage" script shows 80% on my n900. I'm not sure what that means but I assume that this is not very good sign. Could somebody explain what is it and how I can rectify the situation?


    2.
    I was wandering if it is possible to add one more optional command to widget config that would be evaluated for true/false and depending on the value would use different colors for real command output (colors can be configurable).

    Example:

    For "Rootfs Usage" script this command would check if space left is less then 20Mb and if so change font color to red, otherwise blue.


    Thanks again to all contributors.

    BugHunter

    Edit | Forward | Quote | Quick Reply | Thanks

     
    dsawhney | # 109 | 2010-01-29, 17:55 | Report

    Originally Posted by BugHunter View Post
    Noob here.

    Thanks a lot for this widget and helpful scripts to all.

    I have a few suggestions:


    "Rootfs Usage" script shows 80% on my n900. I'm not sure what that means but I assume that this is not very good sign. Could somebody explain what is it and how I can rectify the situation?

    BugHunter
    That means your root file system is 80% full (out of 256MB total). If it gets too full, you may not be able to use your N900. Try not to install too many non-optified apps. For more information on N900 file system and opt issue, see here - http://wiki.maemo.org/N900_filesystem & http://wiki.maemo.org/Opt_Problem

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to dsawhney For This Useful Post:
    BugHunter

     
    BugHunter | # 110 | 2010-01-29, 19:37 | Report

    @dsawhney Thank you for explanation.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Page 11 of 42 | Prev |   9     10   11   12     13   21 | Next | Last
vBulletin® Version 3.8.8
Normal Logout