Results 1 to 10 of 313

Thread: Conky Support Scripts: Show us your "Scripts" & Screenshots of what they do.

Hybrid View

  1. #1
    Join Date
    Sep 2007
    Beans
    Hidden!

    Conky Support Scripts: Show us your "Scripts" & Screenshots of what they do.

    OK, the mega thread Post your .conkyrc files w/ screenshots has been hijacked by Conky Calendars, to the point that people asking for help with other aspects of conky are having their requests for help buried in an avalanche.

    So today I though why not a Conky "Script" Support Thread? Obviously if you are showing your Conky screenshot and the files that did it the scripts will accompany it on the other thread.

    But if you see a "script", bash, python, perl - who cares, that you can "touch up" copy it here and have at it with various other "script junkies" (meant in a good way), after all we all win! Or if you have a NEW script for conky you are working on bring it here.

    I ask that each post here has a link to Post your .conkyrc files w/ screenshots if the script came from there or when the "CCCC" script writers agree that it's done as best it can be, a post on the mega thread explaining what the script does with a screenie and a link to the post here to get the script.

    What do you think?
    Have a nice day.
    Bruce
    Last edited by Bruce M.; December 18th, 2009 at 02:28 PM.

  2. #2
    Join Date
    Jan 2007
    Beans
    Hidden!

    Re: Conky Support Scripts: Show us your "Scripts" & Screenshots of what they do.

    There could be a BASH script yes?
    Linux Debian Sid (Minted) x86_64/3.12.10, Conky 2.0_pre, Xorg 7.7/1.15.0, KDE 4.11.5, Lenovo T61, Intel X3100, HITACHI HTS722010K9SA00 100GB, WDC_WD5000BEVT 500GB
    Linux user No.: 483055 | My Conky Pitstop corner | One4All project

  3. #3
    Join Date
    Sep 2007
    Beans
    Hidden!

    Re: Conky Support Scripts: Show us your "Scripts" & Screenshots of what they do.

    Quote Originally Posted by dk75 View Post
    There could be a BASH script yes?
    Absolutely for example:

    Code:
    ${execpi 8 hddtemp /dev/sda | cut --characters 34-37 | xargs ~/Conky/scripts/ColorTempHDD.sh}
    calls the bash script: ColorTempHDD.sh a modified version of Crinos'512's colorize.sh;

    Code:
    #!/bin/bash
    # colorize.sh
    # by: Crinos512
    
    COOL=45
    WARM=56
    
    if [[ $1 < $COOL ]]
       then echo "\${color7}"$1    # COOL
    elif [[ $1 > $WARM ]]
       then echo "\${color9}"$1    # HOT
    else echo "\${color8}"$1       # WARM
    fi
    
    exit 0
    CHIMO!
    Bruce

  4. #4
    Join Date
    Oct 2009
    Location
    UK
    Beans
    85

    Re: Conky Support Scripts: Show us your "Scripts" & Screenshots of what they do.

    What a fantastic idea! Bruce you legend.

    Right... curl and rss feeds, can somebody give some me some guides, tips or help?

    Thanks in advance
    #!Crunchbang

  5. #5
    Join Date
    Jan 2007
    Beans
    Hidden!

    Re: Conky Support Scripts: Show us your "Scripts" & Screenshots of what they do.

    why... did it need to be curl?

    Code:
    sudo apt-get install python-feedparser
    there is web page with all available commands: Universal Feedparser

    and there is my example code
    Code:
    #! /usr/bin/env python
    # -*- coding: utf-8 -*-
    ##############################################################
    # parse RSS feed
    # RSS.py rss.url no._of_entry_to_parse
    ##############################################################
    
    import sys
    import feedparser
    d = feedparser.parse(sys.argv[1])
    print
    print d.entries[int(sys.argv[2])].title.replace('<br />' , '\n').replace('<p>' , '\n\t').replace('</p>' , '\n')
    print
    print d.entries[int(sys.argv[2])].description.replace('<br />' , '\n').replace('<p>' , '\n\t').replace('</p>' , '\n')
    print
    e = d.entries[int(sys.argv[2])]
    print ('Link: '),e.link
    print
    print d.entries[int(sys.argv[2])].category
    print
    print d.entries[int(sys.argv[2])].status
    print
    quit()
    Linux Debian Sid (Minted) x86_64/3.12.10, Conky 2.0_pre, Xorg 7.7/1.15.0, KDE 4.11.5, Lenovo T61, Intel X3100, HITACHI HTS722010K9SA00 100GB, WDC_WD5000BEVT 500GB
    Linux user No.: 483055 | My Conky Pitstop corner | One4All project

  6. #6
    Join Date
    Oct 2009
    Location
    UK
    Beans
    85

    Re: Conky Support Scripts: Show us your "Scripts" & Screenshots of what they do.

    Quote Originally Posted by dk75 View Post
    why... did it need to be curl?
    It doesn't, that is all I knew really.
    I'll give it a go
    Cheers.
    #!Crunchbang

  7. #7
    Join Date
    May 2008
    Beans
    Hidden!

    Re: Conky Support Scripts: Show us your "Scripts" & Screenshots of what they do.

    Excellent idea! I wish I'd thought of it!
    as a reply to one of your posts in the conky mega-thread:

    BASH Beginner's Guide
    and
    Writing Shell Scripts

    and this script I'll post here isn't even mine:
    conky-rss.sh
    Code:
    #!/bin/bash
    # RSS Display Script by Bill Woodford (admin@sdesign.us) v1.0
    #
    #RSS Setup - Don't change unless you want these values hard-coded!
    uri=$1                                                  #URI of RSS Feed
    lines=$2                                                #Number of headlines
    titlenum=$3                                             #Number of extra titles
    #Script start
    #Require a uri, as a minimum
    if [[ "$uri" == "" ]]; then
            echo "No URI specified, cannot continue!" >&2
            echo "Please read script for more information" >&2
    else
            #Set defaults if none specified
            if [[ $lines == "" ]]; then lines=25 ; fi
            if [[ $titlenum == "" ]]; then titlenum=2 ; fi
    
            #The actual work
            curl -A "Mozilla/5.0" -s --connect-timeout 30 $uri |\
            grep -io "<title>[^<]*"|\
            sed -e 's/<[^>]*>//'|\
            head -n $(($lines + $titlenum)) |\
            tail -n $(($lines))
    fi

  8. #8
    Join Date
    Sep 2007
    Beans
    Hidden!

    Re: Conky Support Scripts: Show us your "Scripts" & Screenshots of what they do.

    Quote Originally Posted by mobilediesel View Post
    Excellent idea! I wish I'd thought of it!
    OK you though of it, no biggie.

    THANK YOU for the links.

    CHIMO!
    Bruce

  9. #9
    Join Date
    Jun 2007
    Location
    North London; England
    Beans
    697

    Re: Conky Support Scripts: Show us your "Scripts" & Screenshots of what they do.

    Quote Originally Posted by mobilediesel View Post
    Excellent idea! I wish I'd thought of it!
    as a reply to one of your posts in the conky mega-thread:

    BASH Beginner's Guide
    and
    Writing Shell Scripts

    and this script I'll post here isn't even mine:
    conky-rss.sh
    Code:
    #!/bin/bash
    # RSS Display Script by Bill Woodford (admin@sdesign.us) v1.0
    #
    #RSS Setup - Don't change unless you want these values hard-coded!
    uri=$1                                                  #URI of RSS Feed
    lines=$2                                                #Number of headlines
    titlenum=$3                                             #Number of extra titles
    #Script start
    #Require a uri, as a minimum
    if [[ "$uri" == "" ]]; then
            echo "No URI specified, cannot continue!" >&2
            echo "Please read script for more information" >&2
    else
            #Set defaults if none specified
            if [[ $lines == "" ]]; then lines=25 ; fi
            if [[ $titlenum == "" ]]; then titlenum=2 ; fi
    
            #The actual work
            curl -A "Mozilla/5.0" -s --connect-timeout 30 $uri |\
            grep -io "<title>[^<]*"|\
            sed -e 's/<[^>]*>//'|\
            head -n $(($lines + $titlenum)) |\
            tail -n $(($lines))
    fi
    thanks , i took parts of your script and threw this together to work with dzen2 , hope you dont mind.



    Code:
    #!/bin/bash 
    FG='#ffffff'
    BG='#000000'
    #FONT='-*-terminus-*-r-normal-*-*-120-*-*-*-*-iso8859-*'
    while true ; do
    url=http://www.harrowtimes.co.uk/news/rss/                             #URl of RSS Feed
    lines=4                                           #Number of headlines
    titlenum=2
    newsrss=`curl -A "Mozilla/5.0" -s --connect-timeout 30 $url | grep -io "<title>[^<]*"| sed -e 's/<[^>]*>//'| head -n $(($lines + $titlenum)) | tail -n $(($lines))|tr '\n' ':'`
    
        printf "%s\n" "$newsrss"
        sleep 20
    done | dzen2 -e '' -y '885' -h '15' -sa 'r'  -ta c -fg $FG -bg $BG -fn $FONT
    the y value will have to be changed depending on the size of your screen (mine is set to go across the bottom of a screen 900px high)
    Attached Images Attached Images
    Desktop:i7 875k|4gb OCZ platinum ddr3 2000|Evga P55 LE mobo|OCZ RevoDrive 50gb|ATI 5850 Black Edition|Silverstone FT02|corsair tx650
    Portable: 13" Macbook Pro 2.8ghz i7 16gb RAM | Asus EEE TF101 | Samsung Galaxy S2

  10. #10
    Join Date
    May 2008
    Beans
    Hidden!

    Re: Conky Support Scripts: Show us your "Scripts" & Screenshots of what they do.

    Quote Originally Posted by markp1989 View Post
    thanks , i took parts of your script and threw this together to work with dzen2 , hope you dont mind.

    the y value will have to be changed depending on the size of your screen (mine is set to go across the bottom of a screen 900px high)
    I don't mind at all! I haven't heard of dzen2. That'll be neat to play with.

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
  •