Re: Conky Help

Ok, so i found a solution. Scroll was nice, but even then it moved my text. Which made me consider the align set of variables.
I have my host name and uptime aligned to the left (the default), then align center, and the song info, then align right and my memory and battery percentage. It seems to have worked, after some hacking. For whatever reason, align center doesn't get it quite to the center. So i had to add -50 to push it over a bit more (which for almost all songs, makes it pretty much the middle).

http://omploader.org/tNWFscQ

just call me...
~FSM~

777

Re: Conky Help

I've got a conky question here....

I want to display a weather radar image in conky. I wrote a tiny script to download the animated gif from the weather website and I call this in conky, and use the conky built in command to display the image.. so far so good. My two problems:

1) I want to use that last frame from the .gif, so I can display the most current image. Is there a command line way of doing this (so I can add it to the script)? Perhaps imagemagick?
2) For some reason, conky does not seem to execute the script. I'm pretty sure the rights to the file are set just fine. I've added to relevant code below.

The two relevant lines from the conkyrc file:

${texeci 300 /home/erik/bin/knmi_radar.sh}
${image /home/erik/bin/meest_recente_radarloop451.gif -p 0,560 -s 200x200}

The script (real simple, I just learned how to do this whole scripting thing, so any comments are welcome):

#!/bin/bash
#
# Erik
# 2010-07-31
#

# Enter the name of the radar GIF image you want to download:
RADARIMAGEURL="http://www.knmi.nl/neerslagradar/images/meest_recente_radarloop451.gif"

# Download the GIF file:
wget -q -N -t 1  "$RADARIMAGEURL" # quiet, timestamping, 1 retry

# Split the file, leave only the last frame. This might be tricky, because the 
# frames seem to share one background frame...

Re: Conky Help

the easiest tool I found for it was gifsicle, it's in the repos install it, then try this:

#!/bin/bash
#
# Erik
# 2010-07-31
#

# Enter the name of the radar GIF image you want to download:
RADARIMAGEURL="http://www.knmi.nl/neerslagradar/images/meest_recente_radarloop451.gif"
RADARIMAGE="meest_recente_radarloop451.gif"

# Download the GIF file:
wget -q -N -t 1  "$RADARIMAGEURL" # quiet, timestamping, 1 retry

# Split the file, leave only the last frame. This might be tricky, because the 
# frames seem to share one background frame...
gifsicle -U "$RADARIMAGE" "#-1" > out.gif
I say never be complete, I say stop being perfect, I say lets evolve, let the chips fall where they may.

779

Re: Conky Help

Thanks Iggy, any idea why conky is not updating the picture?

Gifsicle is giving me some problems, but I think I can get that to work.

Re: Conky Help

do you have imlib_cache_size set to 0 in your .conkyrc? If not then it will cache the image and not refresh.

I say never be complete, I say stop being perfect, I say lets evolve, let the chips fall where they may.

781

Re: Conky Help

iggykoopa wrote:

do you have imlib_cache_size set to 0 in your .conkyrc? If not then it will cache the image and not refresh.

Good point, I don't think so, I'll check that later at home.  But the bigger problem is, conky doesn't run the script... I.e: if I delete the picture and restart conky, it doesn't display anything at all. But if I run the script manually and then restart conky, it does show it. Weird huh.

Re: Conky Help

it's because it downloads the images to your home directory, you have it set to load the image from your bin directory.

I say never be complete, I say stop being perfect, I say lets evolve, let the chips fall where they may.

Re: Conky Help

Hi, I've just added arplinux's 'zen-lua' script to conky (which works to a certain degree). After adding it to my start up script it takes control of my desktop, making me unable access anything.

When I run the script via terminal this is what I get:

:~$ conseg.sh
Conky: desktop window (9a) is root window
Conky: window type - override
Conky: drawing to created window (0x2200001)
Conky: drawing to double buffer
Conky: llua_do_call: function conky_ring_stats execution failed: /home/greenys/scripts/zen-rings1.lua:157: attempt to perform arithmetic on local 'value' (a nil value)
Conky: desktop window (9a) is root window
Conky: window type - override
Conky: drawing to created window (0x2400001)
Conky: drawing to double buffer
Conky: llua_do_call: function conky_ring_stats execution failed: /home/greenys/scripts/zen-rings2.lua:131: attempt to perform arithmetic on local 'value' (a nil value)
Conky: llua_do_call: function conky_ring_stats execution failed: /home/greenys/scripts/zen-rings2.lua:131: attempt to perform arithmetic on local 'value' (a nil value)

Can anyone help?
Oh, thanks to arplinux for his mini how to and scripts from deviant art, lua and cairo has had me stumped for ages, and now I get it (kind of).

#!Crunchbang - an inverted wall of learning, definitely no curve!

Re: Conky Help

I finally got around to adding my todo list to my conky via

$alignr${execpi 300 cat ~/documents/todo}

But only the first line of the todo is aligned right.  Is there a way to align each line without having to read each line separately?

785

Re: Conky Help

freedomweasel wrote:

I finally got around to adding my todo list to my conky...

should have put it in your todo list tongue

$alignr${execpi 300 cat ~/documents/todo}

But only the first line of the todo is aligned right.  Is there a way to align each line without having to read each line separately?

im guessing you could do

${eval ${execpci 300 cat ~/documents/todo | awk '// {print "${alignr}" $0 }'}} 

the awk section adds '$alignr' to each line, eval evals it, the awk section should work, not sure about the conky parts tho.

Last edited by benj1 (2010-08-25 14:05:36)

- - - - - - - - Wiki Pages - - - - - - -
#! install guide           *autostart programs, modify the menu & keybindings
configuring Conky       *installing scripts

Re: Conky Help

benj1 wrote:

should have put it in your todo list tongue

Actually it was number 1 on my list, but I couldn't see it as it wasn't on conky smile   It's since been replaced with "align todo on conky".  And it's displayed all awkwardly to drive the point home.

I'll check out your suggestion when I get home and see how it goes.  After posting my question last night I changed the line from cat to sort, and that (even with the $alignr) aligned every line to the left, which looks mostly alright.  Hopefully your line will fix or move me towards the answer.

Thanks!

787

Re: Conky Help

Why don't you just type the to-do things in your .conkyrc? That's what I did smile

Let's do it and don't screw it.
      Github || Deviantart

Re: Conky Help

Unia wrote:

Why don't you just type the to-do things in your .conkyrc? That's what I did smile

That seems much more complicated to me actually, even with my alignment problems.

Currently, to add a todo I do the following: Super+t, echo i need to do this thing >> ./documents/todo
or if I need to edit the file more in-depth: nano documents/todo

It seems like you would have to open up .conkyrc, scroll to wherever your todo list is, edit, and then restart conky.  Unless I misunderstood?  If you have long-term todos I can see that working, but I often have todos/reminders like "get milk", "look for a media manager", that change every day.

Also, as a 'learning to code again' project I'm going to make a ruby-based todo editor so I could type:

todo add "my awesome task" at the bash prompt, with functionality similar to todo.sh featured on lifehacker.  only it will be in ruby, and Made By Me (tm)

And that's about enough off-topic for now

/ramble

789

Re: Conky Help

Ah I see. Sorry for misunderstanding it. To me having it directly in my .conkyrc is good enough, as I made an entrie to edit the config file in my main menu. I don't know how it's with you guys, but when I change and safe my .conkyrc, conky automatically restarts smile

Let's do it and don't screw it.
      Github || Deviantart

Re: Conky Help

change your line to:

${execpi 300 cat ~/documents/todo | sed s/^/\${alignr}/}

from this http://ubuntuforums.org/showthread.php?t=1068724 post

I say never be complete, I say stop being perfect, I say lets evolve, let the chips fall where they may.

Re: Conky Help

iggykoopa wrote:

change your line to:

${execpi 300 cat ~/documents/todo | sed s/^/\${alignr}/}

from this http://ubuntuforums.org/showthread.php?t=1068724 post

thanks, that worked perfectly!
Just need to go dig around and figure out what those commands do! 

and Unia, I just like to be able to have the todo in a text so I can grep it for tags, and not have to edit around the rest of the conky file.  But, that is the glory of choices.

Re: Conky Help

freedomweasel wrote:
iggykoopa wrote:

change your line to:

${execpi 300 cat ~/documents/todo | sed s/^/\${alignr}/}

from this http://ubuntuforums.org/showthread.php?t=1068724 post

thanks, that worked perfectly!
Just need to go dig around and figure out what those commands do! 

and Unia, I just like to be able to have the todo in a text so I can grep it for tags, and not have to edit around the rest of the conky file.  But, that is the glory of choices.


I hope you are going to show this someday with a test todo list   smile

Re: Conky Help

Sector11 wrote:

I hope you are going to show this someday with a test todo list   smile

This will be my last post in this thread so I can stop going off-topic.  But if you are interested, go to todotxt.com.  I plan on making something similar but in ruby.  No real reason.  I will of course post it around here somewhere, most likely for help!

Re: Conky Help

freedomweasel wrote:
Sector11 wrote:

I hope you are going to show this someday with a test todo list   smile

This will be my last post in this thread so I can stop going off-topic.  But if you are interested, go to todotxt.com.  I plan on making something similar but in ruby.  No real reason.  I will of course post it around here somewhere, most likely for help!

Talking about help with a conky is not off topic, and yout todo list is for use with conky.

And when the time comes you can show it here: My Conky Config and be on topic too.

Re: Conky Help

I have 2 different to do lists

-  one of them is for long-term items and is handle by Conky, using a text file called TODO.txt that is in my home folder:  $alignc ${execi 30 cat /home/oupsemma/TODO.txt}

- the second one is for short-term items and is integrated in Openbox menu, I found it in Arch forum:
https://bbs.archlinux.org/viewtopic.php?id=91544
the script to download is here: http://aur.archlinux.org/packages/openb … enbox-todo

Screenshots here:
http://img821.imageshack.us/img821/2599/todo.png
http://img715.imageshack.us/img715/7350 … dentry.png
it gives you a small GUI to edit or delete your to dos.

Last edited by oupsemma (2010-08-26 04:48:07)

#Linux user 482038, eeepc 1000H and 901

Re: Conky Help

Okay, another problem.  I've implemented most of my todo script, which adds some non-letter characters such as @ and # to my txt file.  The problem is now that my line in conky:

${execpi 300 cat ~/documents/todo | sed s/^/\${alignr}/}

omits everything after the first '#' in the text file.  is ${execpi} taking the output of the cat command and trying to display all of it as text?  That would make sense as the '#'s would comment out my todo lines.  Is there a workaround?

edit: to clarify 'my todo script' is a ruby program I'm working on, unrelated to conky.  It happens to place '#' characters in the txt which seem to be giving me trouble when displaying the file in conky.

Last edited by freedomweasel (2010-08-27 03:08:53)

Re: Conky Help

Try adding  ${exec echo '#!'} to your Conky script before the #!

Registered Linux User: #497030
LinuxMint Forum | DeviantART page | Lost-in-the-Box Forum  |  Ask.Debian
#!Crunchbang 'Statler' (Openbox) -- LinuxMint-Debian-Fluxbox Edition

Re: Conky Help

@freedomweasel:  I *think* replacing execpi with execi would fix your problem...if you didn't have the $alignr in there.  You'd have to live with having the list aligned left.  The only alternatives I can think of are either rewriting the Ruby script to *not* include the pound symbols or having sed replace them with something else.

while ( ! ( succeed = try() ) );

Re: Conky Help

pvsage wrote:

@freedomweasel:  I *think* replacing execpi with execi would fix your problem...if you didn't have the $alignr in there.  You'd have to live with having the list aligned left.  The only alternatives I can think of are either rewriting the Ruby script to *not* include the pound symbols or having sed replace them with something else.

like magic.  thanks for the help.

800

Re: Conky Help

Hi,

I'd like to have a semi-transparent background in conky, from top to bottom so it matches my tint2 background. See screenshot below:
http://omploader.org/tNWN1cw

I've already googled, but didn't find a solution neutral
Hope you can help me with this (simple, compared to the other questions tongue) task

Let's do it and don't screw it.
      Github || Deviantart