conky

conkyrc - Save this as ~/.conkyrc.

check_mail.rb - Displays a few messages from an IMAP mailbox.
countdown.rb - Displays the number of days until some date.
ip - Displays your IP address as seen from some server.
now_playing.rb - Displays the currently playing artist/song from Amarok.
weather.rb - Displays the weather from Yahoo Weather.

Screenshot:
Screenshot

9 Responses to “conky”

  1. Quoth Athanasius:

    I am using Ubuntu Edgy. How do I make this work in my .conkyrc file? Is there something that I am supposed to download to make the script work?

  2. Quoth Brian:

    You need Ruby for all of these. And you need the xmlsimple Ruby gem for the weather script. I don't think xmlsimple is in any repos, it would have to be installed via rubygems.

  3. Quoth Eric:

    I like your conky file. I'm trying to get your weather.rb working but every time I start conky, I get the error /home/eric/weather.rb:3:in `require': no such file to load — xmlsimple (LoadError)
    from /home/eric/weather.rb:3

    I've got xmlsimple install via ruby gem. Do you have any suggestions?

  4. Quoth Brian:

    You may have to tell Ruby how to find the gem. Export the environment variable RUBYOPT=”rubygems” would do it. That's my first thought.

  5. Quoth Bananas:

    Hey, trying to get the mail script working

    heres the error i get

    /usr/lib/ruby/1.8/net/imap.rb:886:in `initialize': getaddrinfo: Name or service not known (SocketError)
    from /usr/lib/ruby/1.8/net/imap.rb:886:in `open'
    from /usr/lib/ruby/1.8/net/imap.rb:886:in `initialize'
    from /usr/local/bin/check_mail.rb:21:in `new'
    from /usr/local/bin/check_mail.rb:21

    Whats the problem?
    Thanks

  6. Quoth Brian:

    I think it means it can't resolve your mail server's domain. You may have a typo in the server name?

  7. Quoth crache:

    Maybe he is trying to use gmail. Is there a way to specify the port number? Thank you for these scripts and config, Simple, yes but very useful.

  8. Quoth crache:

    tried changing the server line to:
    imap = Net::IMAP.new('imap.gmail.com', 993, true)

    that gave me:

    /usr/lib/ruby/1.8/net/imap.rb:983:in `pick_up_tagged_response': TODO (not supported yet) 20if1910406wfi.0 (Net::IMAP::BadResponseError)
    from /usr/lib/ruby/1.8/net/imap.rb:974:in `get_tagged_response'
    from /usr/lib/ruby/1.8/net/imap.rb:1032:in `send_command'
    from /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
    from /usr/lib/ruby/1.8/net/imap.rb:1017:in `send_command'
    from /usr/lib/ruby/1.8/net/imap.rb:361:in `authenticate'
    from check_mail.rb:21

    This is my first time looking at ruby.. i'm not a programmer :-/

  9. Quoth ethan vizitei:

    @crache

    that error indicates that gmail does not support an IMAP command that you're trying to use. I can see from your stack trace that you are using the “authenticate” method in this script, and it uses commands that the gmail server doesn't support. Try using the “login” method of net/imap rather than “authenticate”, that should take care of it.

    Hope that helps.

Leave a Reply

You can use these tags in comments (Note: HTML is automatically escaped inside <pre> tags, nowhere else, so if you post source code, put it in <pre>):

<pre lang="some_programming_language"> 
<em>
<strong>
<a href="url">

NOTE: Comments are automatically spam-filtered. If your comment fails to appear, it was likely munched by the filter. Try not to link-spam or post anything that looks like it was typed by a robot.