Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: "Modular" Conky

  1. #11
    Join Date
    Jul 2007
    Location
    The U. S. of A.
    Beans
    163
    Distro
    Kubuntu Development Release

    Thumbs down Re: "Modular" Conky

    Quote Originally Posted by jr.gotti View Post
    yeah thats possible, but why set the color in two places instead of one?
    you mean like this?
    Code:
    #Variables
    color1 = "#ffcb48"
    color2 = "#FFFFFF" 
    
    #System Info:
    ${execi 5 sysinfo color1 color2 }
    
    #Network Info
    ${execi 5 networkinfo color1 color2}
    
    #Disk Usage Info:
    ${execi 5 diskfreeinfo color1 color2}
    (... can't help on the battery info , sorry.)

  2. #12
    Join Date
    Apr 2005
    Location
    Parts Unknown
    Beans
    9,213
    Distro
    Ubuntu Development Release

    Re: "Modular" Conky

    Code:
    cat /proc/acpi/battery/BAT0/state
    present:                 yes
    capacity state:          ok
    charging state:          charged
    present rate:            unknown
    remaining capacity:      4400 mAh
    present voltage:         14800 mV
    Code:
    cat /proc/acpi/battery/BAT0/info
    present:                 yes
    design capacity:         4400 mAh
    last full capacity:      4400 mAh
    battery technology:      rechargeable
    design voltage:          14800 mV
    design capacity warning: 440 mAh
    design capacity low:     176 mAh
    capacity granularity 1:  264 mAh
    capacity granularity 2:  3960 mAh
    model number:            BAT0
    serial number:           236
    battery type:            Lion
    OEM info:                SMP
    what's a troll? | my blog | my writing | Ubuntu Unleashed

    Don't ask support questions in PMs--post a thread so everyone can benefit!

  3. #13
    Join Date
    Jun 2005
    Location
    New Jersey, United States
    Beans
    169
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: "Modular" Conky

    Quote Originally Posted by matthew View Post
    Code:
    cat /proc/acpi/battery/BAT0/state
    present:                 yes
    capacity state:          ok
    charging state:          charged
    present rate:            unknown
    remaining capacity:      4400 mAh
    present voltage:         14800 mV
    Code:
    cat /proc/acpi/battery/BAT0/info
    present:                 yes
    design capacity:         4400 mAh
    last full capacity:      4400 mAh
    battery technology:      rechargeable
    design voltage:          14800 mV
    design capacity warning: 440 mAh
    design capacity low:     176 mAh
    capacity granularity 1:  264 mAh
    capacity granularity 2:  3960 mAh
    model number:            BAT0
    serial number:           236
    battery type:            Lion
    OEM info:                SMP
    Thanks matt...looks like I'll have to change it a lil.
    Good at writing shell scripts? Know anything about GTK programming?
    Help out a new project at http://www.s-online.org/labels/About.html

  4. #14
    Join Date
    Jun 2005
    Location
    New Jersey, United States
    Beans
    169
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: "Modular" Conky

    Quote Originally Posted by Crinos512 View Post
    you mean like this?
    Code:
    #Variables
    color1 = "#ffcb48"
    color2 = "#FFFFFF" 
    
    #System Info:
    ${execi 5 sysinfo color1 color2 }
    
    #Network Info
    ${execi 5 networkinfo color1 color2}
    
    #Disk Usage Info:
    ${execi 5 diskfreeinfo color1 color2}
    (... can't help on the battery info , sorry.)
    Yeah..but even here your still manually setting the color...just in a different place.
    Good at writing shell scripts? Know anything about GTK programming?
    Help out a new project at http://www.s-online.org/labels/About.html

  5. #15
    Join Date
    Jun 2005
    Location
    New Jersey, United States
    Beans
    169
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: "Modular" Conky

    Not to revive this old thread, but I figure this is a good place to keep all these for the time being, so heres a new one.

    This script will use Nmap to determine all hosts which are currently connected to the network you are on. Before this script can be used you must have nmap, apcalc, and dog installed. (Yes...dog. It's kinda like cat v2.0)

    Code:
    #!/bin/sh
    #
    # Script by Jason Gotti (email removed for spambots)
    # Written and tested on Ubuntu 7.04.
    #
    # Developed for use with conky, but also can be used 
    # for other information related purposes. 
    #
    # Variables. Change "ath0" to reflect your network interface. (Check in "ifconfig")
    # You also need to install nmap, apcalc, and dog for this script to function correctly..
    addressrange=$(ifconfig ath0 | grep "inet addr" | awk -F: {' print $2 '} | awk {' print $1 '} | awk -F. '{ print $1,".",$2,".",$3,".",0,"/24" }' | tr -d " ")
    numberofhosts=$(nmap -sP $addressrange | grep Host | wc -l)
    currenthost=1
    host=$(nmap -sP $addressrange | grep Host | dog -l $currenthost | awk '{ print $2 }')
    
    while [ $currenthost -le $numberofhosts ]
    do
    echo $host
    currenthost=$(calc $currenthost+1)
    host=$(nmap -sP $addressrange | grep Host | dog -l $currenthost | awk '{ print $2 }')
    done
    It's callled in conkyrc like so:

    Code:
    ${color #ffcb48}Disk Usage Info:
    ${color #FFFFFF}${execi 5 diskfreeinfo}
    And finally, it outputs like this on my current network. Of course, it's going to change to display the hosts on your network.

    Code:
    Hosts Online:
    192.168.2.1
    192.168.2.20
    192.168.2.104
    Enjoy!
    Good at writing shell scripts? Know anything about GTK programming?
    Help out a new project at http://www.s-online.org/labels/About.html

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •