SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#676 2012-08-21 22:16:17

falldown
#! Samurai
Registered: 2011-09-01
Posts: 1,726

Re: interactive conky

arclance wrote:

^ 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 cool 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.

Offline

Help fund CrunchBang, donate to the project!

#677 2012-08-21 22:19:33

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 935

Re: interactive conky

^ 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

#678 2012-08-21 22:38:48

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 935

Re: interactive conky

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

#679 2012-08-21 22:42:06

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 13,408
Website

Re: interactive conky

arclance wrote:

^ 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

#680 2012-08-21 22:53:40

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 935

Re: interactive conky

^ 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

#681 2012-08-21 23:43:07

falldown
#! Samurai
Registered: 2011-09-01
Posts: 1,726

Re: interactive conky

For the time being this will suffice..
2012_08_21_1345596618_614x220_scrot.jpg

Last edited by falldown (2012-08-22 00:51:08)

Offline

#682 2012-08-22 00:40:56

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 13,408
Website

Re: interactive conky

falldown wrote:

For the time being this will suffice..
2012_08_21_1345592462_641x795_scrot.jpg

What?  No Klingons?  Just kidding, so when do you release the code?

Offline

#683 2012-08-22 00:49:29

falldown
#! Samurai
Registered: 2011-09-01
Posts: 1,726

Re: interactive conky

^sorry S11..
I was referring to the weather button/ image issue. big_smile
I would say a couple more days (at most)
and as the good Captain would say..
"Make it so.. "

Offline

#684 2012-08-22 01:14:45

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 13,408
Website

Re: interactive conky

^^

Scotty wrote:

"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

#685 2012-08-22 01:28:00

falldown
#! Samurai
Registered: 2011-09-01
Posts: 1,726

Re: interactive conky

Yes and thank you for asking.
We are still unpacking, but that is ok. big_smile

Offline

#686 2012-08-22 01:39:02

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 13,408
Website

Re: interactive conky

falldown wrote:

Yes and thank you for asking.
We are still unpacking, but that is ok. big_smile

My rule of thumb was: Unpack it when you need it.  That was when I was single.  big_smile

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! lol

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

#687 2012-08-22 02:51:22

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 3,460

Re: interactive conky

falldown wrote:

For the time being this will suffice..
2012_08_21_1345596618_614x220_scrot.jpg

i feel that i'm just repeating myself when i say "that is awesome" big_smile

Offline

#688 2012-08-22 15:21:25

falldown
#! Samurai
Registered: 2011-09-01
Posts: 1,726

Re: interactive conky

Needed to add a video for this one..
http://youtu.be/rXnkQzRKpi8
2012_08_22_1345649945_328x162_scrot.jpg
Not finished.. just wanted to introduce it. big_smile


Peachy

i feel that i'm just repeating myself when i say "that is awesome" big_smile

I don't mind if you keep saying it!! smile

Last edited by falldown (2012-08-22 15:40:22)

Offline

#689 2012-08-22 15:35:23

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 13,408
Website

Re: interactive conky

falldown wrote:

Needed to add a video for this one..
http://youtu.be/rXnkQzRKpi8
Not finished.. just wanted to introduce it. big_smile


Peachy

i feel that i'm just repeating myself when i say "that is awesome" big_smile

I don't mind if you keep saying it!! smile

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

source

Did you use this: Tal Shiar - Star Trek Fonts

Last edited by Sector11 (2012-08-22 15:52:29)

Offline

#690 2012-08-22 17:18:40

falldown
#! Samurai
Registered: 2011-09-01
Posts: 1,726

Re: interactive conky

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.  big_smile

Offline

#691 2012-08-22 19:26:36

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 13,408
Website

Re: interactive conky

falldown wrote:
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.  big_smile

Quite a few don't have numbers ... sad
acqPHAPt.jpg
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

#692 2012-08-22 23:30:30

falldown
#! Samurai
Registered: 2011-09-01
Posts: 1,726

Re: interactive conky

Memory used- RAM
Reserved used-swap
Process log-Top 4 mem processes
Holodeck-gpu goodies
2012_08_22_1345678193_477x222_scrot.jpg

and here is what she looks like so far..
2012_08_22_1345678751_1440x900_scrot.jpg

Last edited by falldown (2012-08-22 23:40:47)

Offline

#693 2012-08-22 23:56:08

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 13,408
Website

Re: interactive conky

falldown wrote:

Memory used- RAM
Reserved used-swap
Process log-Top 4 mem processes
Holodeck-gpu goodies

and 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:

adgA9spH.jpg

Offline

#694 2012-08-23 00:16:12

falldown
#! Samurai
Registered: 2011-09-01
Posts: 1,726

Re: interactive conky

S11 you just gave me a super idea!!
Now I must get it down before I talk myself out of it.. big_smile

Offline

#695 2012-08-23 00:27:47

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 13,408
Website

Re: interactive conky

falldown wrote:

S11 you just gave me a super idea!!
Now I must get it down before I talk myself out of it.. big_smile

cool Just made my day!  Thanks.

Offline

#696 2012-08-23 00:49:33

falldown
#! Samurai
Registered: 2011-09-01
Posts: 1,726

Re: interactive conky

S11 wrote:

cool Just made my day!  Thanks.

Actually S11 I should say the same.. You are welcome and thank you. big_smile

Offline

#697 2012-08-23 05:35:51

falldown
#! Samurai
Registered: 2011-09-01
Posts: 1,726

Re: interactive conky

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
end

Offline

#698 2012-08-23 14:53:28

falldown
#! Samurai
Registered: 2011-09-01
Posts: 1,726

Re: interactive conky

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?

Offline

#699 2012-08-23 14:59:50

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 935

Re: interactive conky

^ 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

Be excellent to each other!

#700 2012-08-23 15:12:35

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 13,408
Website

Re: interactive conky

What about: mplayer-nogui

Or this for vlc

Last edited by Sector11 (2012-08-23 15:19:34)

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo