You are not logged in.
^ Animated gifs can work in conky that's how I get the radar images in my weather script.
I use gifsicle to separate each frame into its own file and wrote some lua to display them in the correct order.
This website shows how to do it in a .conkyrc without using lua
It is much trickier to setup that way though since you have a lot of if statements.I believe you can also use graphics/image magick to break up the gif images.
Peachy wrote a pretty
lua function for displaying images in a file.
We used it for the cyber-v9000.
It works very well.
That might be the way to go.
Peachy's Wun Lua / Peachy's v9000 / Conky PitStop / My DA Page
........
Offline
^ Yes you could write a mrpeachy style lua function, that would be easiest for people to use.
I could write the basic function if mrpeachy wanted to make it usable from .conkyrc afterwards.
Though I don't think you want to run gifsicle every update it is not instantaneous.
Last edited by arclance (2012-08-21 22:38:40)
Offline
Here is the basic code it should load each split frame in order and then start over.
updateCheck = 0
--# im.file = "original file path"
function a_gif(im)
local x = nil
x = (im.x or 0)
local y = nil
y = (im.y or 0)
local w = nil
w = (im.w or default_image_width)
local h = nil
h = (im.h or default_image_height)
--###################################
local file = im.file.."."..string.format("%03i", updateCheck)
--###################################
if file == nil then
print("set image file")
end --# if file == nil then
local show = imlib_load_image(file)
if ((show == nil) and (updateCheck ~= 0)) then --# might be out of frames to load, try to load first frame
show = imlib_load_image(im.file..".000")
if show == nil then --# no image file found
print("file not found")
return
end --# if show == nile
else
print("file not found")
return
end --# if show == nil then
imlib_context_set_image(show)
local WIDTH = nil
if tonumber(w) == 0 then
WIDTH = imlib_image_get_width()
else
WIDTH = tonumber(w)
end --# if tonumber(w) == 0 then
local HEIGHT = nil
if tonumber(h) == 0 then
HEIGHT = imlib_image_get_height()
else
HEIGHT = tonumber(h)
end --# if tonumber(h) == 0 then
local scaled = imlib_create_cropped_scaled_image(0, 0, imlib_image_get_width(), imlib_image_get_height(), WIDTH, HEIGHT)
imlib_free_image_and_decache()
imlib_context_set_image(scaled)
imlib_render_image_on_drawable(x, y)
imlib_free_image_and_decache()
show = nil
WIDTH = nil
HEIGHT = nil
x = nil
y = nil
w = nil
h = nil
file = nil
scaled = nil
--####################################
updateCheck = updateCheck + 1
end --# function a_gif()The animated gif needs to be split with gifsicle first, I will leave it up to mrpeachy to decide how to handle that part.
Last edited by arclance (2012-08-21 22:41:44)
Offline
^ Animated gifs can work in conky that's how I get the radar images in my weather script.
I use gifsicle to separate each frame into its own file and wrote some lua to display them in the correct order.
This website shows how to do it in a .conkyrc without using lua
It is much trickier to setup that way though since you have a lot of if statements.I believe you can also use graphics/image magick to break up the gif images.
That's cheating, using the separate frames and the writing a script to do the changes.
What I meant was:
${image ~/path-to/StarTrek.gif}and it works!
Offline
^ imlib2, which conky uses to load image files, does not support animated gifs.
That means conky can not support animated gifs without a rewrite of the image code.
Since the conky developers don't feel like fixing a memory leak right now I would not hold my breath for animated gif support.
Last edited by arclance (2012-08-21 22:55:58)
Offline
Peachy's Wun Lua / Peachy's v9000 / Conky PitStop / My DA Page
........
Offline
What? No Klingons? Just kidding, so when do you release the code?
Offline
^sorry S11..
I was referring to the weather button/ image issue. 
I would say a couple more days (at most)
and as the good Captain would say..
"Make it so.. "
Peachy's Wun Lua / Peachy's v9000 / Conky PitStop / My DA Page
........
Offline
^^
"But Cap't, I'm givin' her everything she's got, if yea want more you'll have'ta gimme another 10 minutes!"
I'd say that looks really good.
Are you fully moved as well?
Last edited by Sector11 (2012-08-22 01:15:40)
Offline
Yes and thank you for asking.
We are still unpacking, but that is ok. 
Peachy's Wun Lua / Peachy's v9000 / Conky PitStop / My DA Page
........
Offline
Yes and thank you for asking.
We are still unpacking, but that is ok.
My rule of thumb was: Unpack it when you need it. That was when I was single. 
Of course that never sat well with the wife who wanted it unpacked, washed and put away as it came off the truck.
WHOA! Slow down! 
Now to get use to the new noises. creaks and cracks in the night - 0j0 - "What was that!"
Last edited by Sector11 (2012-08-22 01:40:48)
Offline
i feel that i'm just repeating myself when i say "that is awesome" 
Offline
Needed to add a video for this one..
http://youtu.be/rXnkQzRKpi8
Not finished.. just wanted to introduce it. 
Peachy
i feel that i'm just repeating myself when i say "that is awesome"
I don't mind if you keep saying it!! 
Last edited by falldown (2012-08-22 15:40:22)
Peachy's Wun Lua / Peachy's v9000 / Conky PitStop / My DA Page
........
Offline
Needed to add a video for this one..
http://youtu.be/rXnkQzRKpi8
Not finished.. just wanted to introduce it.Peachy
i feel that i'm just repeating myself when i say "that is awesome"
I don't mind if you keep saying it!!
Oh WOW!!!!!!!! Now that's just Supercalifragilisticexpialidocious!
I'd like to hear Worf say that in Klingon but he's probably say: yIDoghQo' or bIjatlh 'e' yImev
Did you use this: Tal Shiar - Star Trek Fonts
Last edited by Sector11 (2012-08-22 15:52:29)
Offline
Did you use this: Tal Shiar - Star Trek Fonts
I used the Star Cine that is on that page.
I wanted to add Romulan to the time section, but apparently they don't have a numeral system. 
Peachy's Wun Lua / Peachy's v9000 / Conky PitStop / My DA Page
........
Offline
S11 wrote:Did you use this: Tal Shiar - Star Trek Fonts
I used the Star Cine that is on that page.
I wanted to add Romulan to the time section, but apparently they don't have a numeral system.
Quite a few don't have numbers ... 

can you tell I was playing around?
They probably use their fingers. Or count like a Lower Slobbovian:
1, 2, 3 and another one and another one and another one ...
Offline
Memory used- RAM
Reserved used-swap
Process log-Top 4 mem processes
Holodeck-gpu goodies
and here is what she looks like so far..
Last edited by falldown (2012-08-22 23:40:47)
Peachy's Wun Lua / Peachy's v9000 / Conky PitStop / My DA Page
........
Offline
Memory used- RAM
Reserved used-swap
Process log-Top 4 mem processes
Holodeck-gpu goodiesand here is what she looks like so far..
You realize I just broke my lower jaw and computer desk don't you.
MOST IMPRESSIVE!!!!
Here - Treckkie but not so overpowering:
Offline
S11 you just gave me a super idea!!
Now I must get it down before I talk myself out of it.. 
Peachy's Wun Lua / Peachy's v9000 / Conky PitStop / My DA Page
........
Offline
S11 you just gave me a super idea!!
Now I must get it down before I talk myself out of it..
Just made my day! Thanks.
Offline
Just made my day! Thanks.
Actually S11 I should say the same.. You are welcome and thank you. 
Peachy's Wun Lua / Peachy's v9000 / Conky PitStop / My DA Page
........
Offline
Peachy my good friend.
Can your timer script be converted into a continuous loop?
--planet display animation
if weatherbutton==1 then
for i = 1, tonumber(timer1_length) do
timer1[i]=(timer1[i+1] or 0)
if i==timer1_length then
timer1[timer1_length]=tonumber(conky_parse('${updates}'))
end
end--of for loop
elseif weatherbutton==0 then
timer1={}
end
directory="/home/falldown/lua/planet/"
if weatherbutton==1 then
count=0
for i=1,timer1_length do
if timer1[i]~=0 then
count=count+1
end
output=count
end
else
output=1
endPeachy's Wun Lua / Peachy's v9000 / Conky PitStop / My DA Page
........
Offline
Peachy I am thinking outloud here..
A bash script can be called into play from conky.
A bash script to open a undecorated video player (vlc) and place it at given location can be writen.
With those two factors in play.. Could conky achieve video playback?
Peachy's Wun Lua / Peachy's v9000 / Conky PitStop / My DA Page
........
Offline
^ I know you can do the size and location from the terminal or a bash script but I don't know if you can control the decorations that way.
Some window managers (Fluxbox, Openbox) will let you control window decorations.
You might have to use one of those to make the video program be undecorated.
Last edited by arclance (2012-08-23 15:11:56)
Offline
Offline
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.