SEARCH

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

You are not logged in.

#576 2012-02-23 13:33:22

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

VastOne wrote:

I liked these ... these.. umm COLORS, yeah thats it .... the colors...

Yes, purple and flesh tone! Veeeeeerrrrrry nice.
OUCH! ... sorry dear ... It's not mine, it's his! Blame him!  lol lol


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

Help fund CrunchBang, donate to the project!

#577 2012-02-23 14:22:05

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

I have a new conky, I went from 2GB RAM to 6GB RAM last week and from an AMD Sempron 2800MHz to an AMD Athlon x3 3200MHz yesterday. Talk about putting a tiger in my tank (sorry ESSO!)

AMD, the Tiger in my Tank
cb42fc176350791.jpg

# To use #! in a conky use: ${exec echo '#!'}
# killall conky && conky -c ~/Conky/S11_CPU_bl.conky &

###  Begin Window Settings  ##################################################
own_window yes
own_window_type override #normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
# own_window_colour brown
own_window_class CPU_Conky
own_window_title AMD Athlon x3

# Use the Xdbe extension? (eliminates flicker)
# It is highly recommended to use own window with this one
# so double buffer won't be so big.
double_buffer yes

### ARGB can be used for real transparency
### NOTE that a composite manager is required for real transparency.
### This option will not work as desired (in most cases) in conjunction with
### 'own_window_type override'
#                                                own_window_argb_visual yes

### When ARGB visuals are enabled, this use this to modify the alpha value
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
#own_window_argb_value 200

minimum_size 120 0     ## width, height
maximum_width 120       ## width, usually a good idea to equal minimum width

gap_x 10 # left-right
gap_y 50 # up-down

alignment bl #top_right
###################################################  End Window Settings  ###
###  Font Settings  #########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont Anonymous Pro:size=8

# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 0
# Force UTF8? requires XFT ###
override_utf8_locale yes

draw_shades no
default_shade_color black

draw_outline no # amplifies text if yes
default_outline_color black

uppercase no
######################################################  End Font Settings  ###
###  Color Settings  #########################################################
default_shade_color grey
default_outline_color black

default_color DCDCDC #Gainsboro
color0 9ACD32 #YellowGreen
color1 778899 #LightSlateGrey
color2 FF8C00 #Darkorange
color3 7FFF00 #Chartreuse
color4 FFA07A #LightSalmon
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 00FFFF #Cyan 48D1CC #MediumTurquoise
color8 FFFF00 #Yellow
color9 FF0000 #Red
#####################################################  End Color Settings  ###
###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders no #yes
default_graph_size 15 40
#####################################################  End Borders Secton  ###
###  Miscellaneous Section  ##################################################

# Boolean value, if true, Conky will be forked to background when started.
background no

# Adds spaces around certain objects to stop them from moving other things
# around, this only helps if you are using a mono font
# Options: right, left or none
use_spacer none

# Default and Minimum size is 256 - needs more for single commands that
# "call" a lot of text IE: bash scripts
text_buffer_size 256

# Subtract (file system) buffers from used memory?
no_buffers yes

# change GiB to G and MiB to M
short_units yes

# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2

##############################################  End Miscellaneous Section  ###
###  LUA Settings  ###########################################################
## Above and After TEXT - requires a composite manager or blinks.
##
# lua_load ~/Conky/LUA/draw-bg.lua
#TEXT
#${lua conky_draw_bg 10 0 0 0 0 0x000000 0.6}
#
## ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
##
## OR Both above TEXT (No composite manager required - no blinking!)
#
lua_load ~/Conky/LUA/draw-bg.lua
lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.5
#
##
#######################################################  End LUA Settings  ###

default_bar_size 120 20 # reverse to command line and no comma:  ${cpubar 20,120}

# The all important - How often conky refreshes.
# If you have a "Crey" try: 0.2 - smokin' - but watch the CPU useage go UP!
update_interval 1


TEXT
  ${color6}AMD Athlon II X3
   450 Processor${color}
C-1 (${color8}${freq_g 1} GHz${color}) ${color6}${cpu cpu1} %${color}
${goto 5}${cpubar cpu1}${goto 5}${color6}${cpugraph cpu1 20,120 FF0000 FFFF00}${color}
C-2 (${color8}${freq_g 2} GHz${color}) ${color6}${cpu cpu2} %${color}
${goto 5}${cpubar cpu2}${goto 5}${color6}${cpugraph cpu2 20,120 FF0000 FFFF00}${color}
C-3 (${color8}${freq_g 3} GHz${color}) ${color6}${cpu cpu3} %${color}
${goto 5}${cpubar cpu3}${goto 5}${color6}${cpugraph cpu3 20,120 FF0000 FFFF00}${color}

·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#578 2012-02-23 15:32:21

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 13,970

Re: Conky v1.9 Thread

VastOne wrote:

I liked these ... these.. umm COLORS, yeah thats it .... the colors...

Your fly's open, kitten. tongue  BAD kitty!

Offline

#579 2012-02-23 18:24:35

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

Re: Conky v1.9 Thread

VastOne wrote:

I liked these ... these.. umm COLORS, yeah thats it .... the colors...

screenshot-02232012-015217am.php

Are those natural or enhanced UMMM colors? big_smile

Offline

#580 2012-02-23 23:56:26

Deegan
Member
From: Italy Varese
Registered: 2011-11-19
Posts: 36

Re: Conky v1.9 Thread

Hi boys.. smile
Do you know how to tell me how come this conky gives me this error?

***** Imlib2 Developer Warning ***** :
    This program is calling the Imlib call:

    imlib_image_get_height();

    With the parameter:

    image

    being NULL. Please fix your program.
***** Imlib2 Developer Warning ***** :
    This program is calling the Imlib call:

    imlib_render_image_on_drawable();

    With the parameter:

    image

    being NULL. Please fix your program.
***** Imlib2 Developer Warning ***** :
    This program is calling the Imlib call:

    imlib_free_image();

    With the parameter:

    image


conky

#imlib_cache_flush_interval

imlib_cache_size 0
use_xft yes
xftfont Bowman:size=9
override_utf8_locale yes


update_interval 1
double_buffer yes
no_buffers yes
text_buffer_size 1024
background no
max_specials 1024

own_window yes
own_window_transparent yes
own_window_type override

#disable_auto_reload 1

draw_shades no
draw_graph_borders no

default_color C8C8C8

minimum_size 360 180
gap_x 0
gap_y 30
alignment tm

# Lua
lua_load ~/conky/mini_pogoda/lua/colorize_main.lua ~/conky/mini_pogoda/lua/mp.lua
lua_draw_hook_pre global_timer

# conky -c ~/conky/mini_pogoda/conky_mp

TEXT
${lua mini_pogoda ITXX0082 light}

Thanks boys...

Offline

#581 2012-02-24 00:40:46

ackernan
#! Junkie
Registered: 2011-01-10
Posts: 403

Re: Conky v1.9 Thread

Deegan wrote:

Hi boys.. smile
Do you know how to tell me how come this conky gives me this error?

***** Imlib2 Developer Warning ***** :
    This program is calling the Imlib call:

    imlib_image_get_height();

    With the parameter:

    image

    being NULL. Please fix your program.
....


conky

...
# Lua
lua_load ~/conky/mini_pogoda/lua/colorize_main.lua ~/conky/mini_pogoda/lua/mp.lua
lua_draw_hook_pre global_timer

# conky -c ~/conky/mini_pogoda/conky_mp

TEXT
${lua mini_pogoda ITXX0082 light}

Thanks boys...

What is/where did you get the lua scripts?

I believe you load lua scripts on separate lines.

Offline

#582 2012-02-24 01:26:28

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

falldown wrote:
VastOne wrote:

I liked these ... these.. umm COLORS, yeah thats it .... the colors...

Are those natural or enhanced UMMM colors? big_smile

naturally enhanced ... yummmm ... errrr colours! !  big_smile

Last edited by Sector11 (2012-02-24 01:27:26)


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#583 2012-02-24 01:55:11

VastOne
#! Ranger
From: V-Ger
Registered: 2011-04-26
Posts: 10,165
Website

Re: Conky v1.9 Thread

#! Crunchbang Linux Rising from the Primordial Soup at Creation

screenshot-02232012-014104am.php

Click on the image to get the green goblin out of the way to see the meaning..


VSIDO | Words That Build Or Destroy

I dev VSIDO

Offline

#584 2012-02-24 10:06:27

Deegan
Member
From: Italy Varese
Registered: 2011-11-19
Posts: 36

Re: Conky v1.9 Thread

Here are the 2 LUA big_smile

colorize_main.lua

--[[ Conky Colorize by kit_oz ]]
--[[ AVAILABLE COLORS ]]
color_w = 0xcccccc
color_r = 0xff4141
color_g = 0x9ade00
color_b = 0x19aeff
color_y = 0xfebe22

--[[ AVAILABLE GRADIENTS ]]
gradients = {
-- 1 weather
{ {-40, 0x005c94}, {-10, color_b}, {0, color_w}, {10, color_y}, {20, color_g}, {40, color_r} },
-- 2 percentage
{ {10, color_g}, {50, color_y}, {90, color_r} },
-- 3 redness
{ {10, color_w}, {90, color_r} },
-- 4 temperatures
{ {30, color_g}, {50, color_y}, {70, color_r} },
-- 5 bitrate
{ {32, color_r}, {160, color_y}, {320, color_g} },
-- 6 track position
{ {0, color_g}, {100, color_b} },
-- 7 unread mails
{ {0, color_g}, {5, color_y}, {10, color_r}},
-- 8 unread feeds
{ {0, color_g}, {10, color_y}, {20, color_r}}
}

--[[ TABLE OF RESULTS]]
result_table = {}

--[[ TIMER ]]
result_table.timer = 0

function conky_global_timer()
    result_table.timer = result_table.timer + 1
end

-- Function for use with 'classic' conky
function color_gradients(arg, number_of_gradient)
    return string.format('${color #%06x}', components_to_color(colorize(arg, gradients[tonumber(number_of_gradient)])))
end

--[[ COLOR <-> RGB ]]
function components_to_color(r, g, b)
    -- Take the RGB components r, g, b, and return an RGB integer
    return ((math.floor(r + 0.5) * 0x10000) + (math.floor(g + 0.5) * 0x100) + math.floor(b + 0.5)) % 0xffffff -- no bit shifting operator in Lua afaik
end

function color_to_components(color)
    -- Take the RGB components r, g, b, and return an RGB integer
    return (color / 0x10000) % 0x100, (color / 0x100) % 0x100, color % 0x100
end


--[[ GRADIENT FUNCTION ]]
function colorize(arg, t)
    local perc = 0
    local arg = tonumber(arg)
    local r1, g1, b1 = color_to_components(t[1][2])
    if arg ~= nil and arg > t[1][1] then
        if arg >= t[#t][1] then
            r1, g1, b1 = color_to_components(t[#t][2])
        else
            local num = 1
            while num < #t do
                if arg >= t[num][1] and arg < t[num + 1][1] then
                    perc = (arg - t[num][1]) / (t[num+1][1] - t[num][1])
                    r1, g1, b1 = color_to_components(t[num][2])
                    r2, g2, b2 = color_to_components(t[num+1][2])
                    r1 = r1 + (r2 - r1) * perc
                    g1 = g1 + (g2 - g1) * perc
                    b1 = b1 + (b2 - b1) * perc
                    num = #t
                end
                num = num + 1
            end
        end
    end
    return r1, g1, b1
end

mp.lua

require 'imlib2'

function conky_mini_pogoda(location, theme)

    if conky_window == nil then return end

    local home = '/home/deegan'

    imlib_add_path_to_font_path('/usr/share/fonts/truetype/ubuntu-font-family')


    local bufferMain = imlib_create_image(conky_window.width, conky_window.height)
    imlib_context_set_image(bufferMain)
    imlib_image_set_has_alpha(1)
    imlib_image_clear()

    local bufferGrad = imlib_create_image(conky_window.width, conky_window.height)
    imlib_context_set_image(bufferGrad)
    imlib_image_set_has_alpha(1)
    imlib_image_clear()

    local bufferShadow = imlib_create_image(conky_window.width, conky_window.height)
    imlib_context_set_image(bufferShadow)
    imlib_image_set_has_alpha(1)
    imlib_image_clear()

    local function fDrawGradient (x, y, w, h, r, g, b)
        local range = imlib_create_color_range()
        imlib_context_set_color_range (range)

        imlib_context_set_color(r, g, b, 255)
        imlib_add_color_to_color_range (0)
        imlib_context_set_color(r/2, g/2, b/2, 255)
        imlib_add_color_to_color_range (20)

        imlib_context_set_image(bufferGrad)
        imlib_image_fill_color_range_rectangle(x, y, w, h, 0)
        imlib_free_color_range()
    end

    local function fDrawRectangle (x, y, r, g, b)
        imlib_context_set_image(bufferMain)
        imlib_context_set_color(30, 30, 30, 255)
        imlib_image_fill_rectangle(x-25, y-3, 50, 6)

        fDrawGradient (x-25, y-3, 50, 6, r, g, b)

        imlib_context_set_image(bufferShadow)
        imlib_context_set_color(60, 60, 60, 200)
        imlib_image_fill_rectangle(x-25, y-3, 50, 6)

    end

    local function fDrawImage (x, y, path)
        local image = imlib_load_image(path)
        imlib_context_set_image(image)
        local w_img, h_img = imlib_image_get_width(), imlib_image_get_height()
        imlib_render_image_on_drawable(x-w_img/2, y-h_img/2)
        imlib_free_image()
    end

    local function fDrawText (x, y, size, txt)
        local font = imlib_load_font ('Ubuntu-B/'..size)
        local w_str, h_str = 0, 0

        imlib_context_set_font(font)
        w_str, h_str = imlib_get_text_size(txt, w_str, h_str)

        imlib_context_set_image(bufferMain)
        imlib_context_set_color(255, 255, 255, 255)
        imlib_text_draw (x-w_str/2, y-h_str/2, txt)

        local r, g, b = 255, 255, 255
        if theme == 'dark' then
            r, g, b = 80, 80, 80
        end

        fDrawGradient (x-w_str/2-10, y-h_str/2, w_str+20, h_str, r, g, b)

        imlib_context_set_image(bufferShadow)
        imlib_context_set_color(60, 60, 60, 200)
        imlib_text_draw (x-w_str/2, y-h_str/2, txt)
    end

    local cx, cy = conky_window.width/2, conky_window.height/2
    if result_table.timer % 60 == 1 then
        result_table.mp = conky_parse('${execpi 3600 conkyForecast --location='..location..' --template=~/conky/mini_pogoda/forecast_mp}')
    end

    if result_table.mp == nil then
        fDrawText(cx, cy, 23, 'No Internet Connection')
    else
        local T = {}
        for w in string.gmatch(result_table.mp, "[-./0-9a-zA-Z ]+") do
            table.insert(T, w)
        end


        local snd = T[3] .. ', ' .. T[4]
        if string.find (T[3], '%d+') then snd = 'Wind ' .. snd end


        fDrawText (cx, 20, 23, 'In '..T[1]..' '..T[2]..' °C')
        fDrawText (cx, 50, 15, snd)

        local max = T[5]
        for i=1, 3 do
            if max < T[5+i] then max = T[5+i] end
        end

        for i=1, 4 do
            local x = cx-35+(i-2)*70
            local dy = (max - T[4+i]) * 3 + 25

            fDrawText (x, dy+85, 23, T[4+i])
            fDrawRectangle (x, dy+105, colorize(T[4+i], gradients[1]))
            fDrawImage (x, dy+140, home..'conky/mini_pogoda/'..theme..'/'..T[8+i]..'.png')
        end
    end


    imlib_context_set_image(bufferShadow)
    imlib_image_blur (2)
    imlib_render_image_on_drawable(0, 0)
    --imlib_free_image()

    imlib_context_set_image(bufferGrad)
    imlib_image_copy_alpha_to_image(bufferMain, 0, 0)
    imlib_render_image_on_drawable(0, 0)
    --imlib_free_image()

    imlib_context_set_image(bufferMain)
    imlib_free_image()
require 'imlib2'

function conky_mini_pogoda(location, theme)

    if conky_window == nil then return end

    local home = '/home/deegan'

    imlib_add_path_to_font_path('/usr/share/fonts/truetype/ubuntu-font-family')


    local bufferMain = imlib_create_image(conky_window.width, conky_window.height)
    imlib_context_set_image(bufferMain)
    imlib_image_set_has_alpha(1)
    imlib_image_clear()

    local bufferGrad = imlib_create_image(conky_window.width, conky_window.height)
    imlib_context_set_image(bufferGrad)
    imlib_image_set_has_alpha(1)
    imlib_image_clear()

    local bufferShadow = imlib_create_image(conky_window.width, conky_window.height)
    imlib_context_set_image(bufferShadow)
    imlib_image_set_has_alpha(1)
    imlib_image_clear()

    local function fDrawGradient (x, y, w, h, r, g, b)
        local range = imlib_create_color_range()
        imlib_context_set_color_range (range)

        imlib_context_set_color(r, g, b, 255)
        imlib_add_color_to_color_range (0)
        imlib_context_set_color(r/2, g/2, b/2, 255)
        imlib_add_color_to_color_range (20)

        imlib_context_set_image(bufferGrad)
        imlib_image_fill_color_range_rectangle(x, y, w, h, 0)
        imlib_free_color_range()
    end

    local function fDrawRectangle (x, y, r, g, b)
        imlib_context_set_image(bufferMain)
        imlib_context_set_color(30, 30, 30, 255)
        imlib_image_fill_rectangle(x-25, y-3, 50, 6)

        fDrawGradient (x-25, y-3, 50, 6, r, g, b)

        imlib_context_set_image(bufferShadow)
        imlib_context_set_color(60, 60, 60, 200)
        imlib_image_fill_rectangle(x-25, y-3, 50, 6)

    end

    local function fDrawImage (x, y, path)
        local image = imlib_load_image(path)
        imlib_context_set_image(image)
        local w_img, h_img = imlib_image_get_width(), imlib_image_get_height()
        imlib_render_image_on_drawable(x-w_img/2, y-h_img/2)
        imlib_free_image()
    end

    local function fDrawText (x, y, size, txt)
        local font = imlib_load_font ('Ubuntu-B/'..size)
        local w_str, h_str = 0, 0

        imlib_context_set_font(font)
        w_str, h_str = imlib_get_text_size(txt, w_str, h_str)

        imlib_context_set_image(bufferMain)
        imlib_context_set_color(255, 255, 255, 255)
        imlib_text_draw (x-w_str/2, y-h_str/2, txt)

        local r, g, b = 255, 255, 255
        if theme == 'dark' then
            r, g, b = 80, 80, 80
        end

        fDrawGradient (x-w_str/2-10, y-h_str/2, w_str+20, h_str, r, g, b)

        imlib_context_set_image(bufferShadow)
        imlib_context_set_color(60, 60, 60, 200)
        imlib_text_draw (x-w_str/2, y-h_str/2, txt)
    end

    local cx, cy = conky_window.width/2, conky_window.height/2
    if result_table.timer % 60 == 1 then
        result_table.mp = conky_parse('${execpi 3600 conkyForecast --location='..location..' --template=~/conky/mini_pogoda/forecast_mp}')
    end

    if result_table.mp == nil then
        fDrawText(cx, cy, 23, 'No Internet Connection')
    else
        local T = {}
        for w in string.gmatch(result_table.mp, "[-./0-9a-zA-Z ]+") do
            table.insert(T, w)
        end


        local snd = T[3] .. ', ' .. T[4]
        if string.find (T[3], '%d+') then snd = 'Wind ' .. snd end


        fDrawText (cx, 20, 23, 'In '..T[1]..' '..T[2]..' °C')
        fDrawText (cx, 50, 15, snd)

        local max = T[5]
        for i=1, 3 do
            if max < T[5+i] then max = T[5+i] end
        end

        for i=1, 4 do
            local x = cx-35+(i-2)*70
            local dy = (max - T[4+i]) * 3 + 25

            fDrawText (x, dy+85, 23, T[4+i])
            fDrawRectangle (x, dy+105, colorize(T[4+i], gradients[1]))
            fDrawImage (x, dy+140, home..'conky/mini_pogoda/'..theme..'/'..T[8+i]..'.png')
        end
    end


    imlib_context_set_image(bufferShadow)
    imlib_image_blur (2)
    imlib_render_image_on_drawable(0, 0)
    imlib_free_image()

    imlib_context_set_image(bufferGrad)
    imlib_image_copy_alpha_to_image(bufferMain, 0, 0)
    imlib_render_image_on_drawable(0, 0)
    imlib_free_image()

    imlib_context_set_image(bufferMain)
    imlib_free_image()

    return ' '


end


end

dt-FOIM.png

--- hmm:/

Last edited by Deegan (2012-02-24 10:26:46)

Offline

#585 2012-02-24 11:47:11

ackernan
#! Junkie
Registered: 2011-01-10
Posts: 403

Re: Conky v1.9 Thread

Deegan wrote:

Here are the 2 LUA big_smile

-- hmm:/

MP.lua uses conkyforecast, I believe that is not working anymore.  MrPeachy has a cool weather script here

I couldn't get the lua scripts you posted to display.  Are they complete?  I believe something is missing, I also get an error for line 99 of mp.lua.

Maybe some more lua knowledge then me can pipe in!

Offline

#586 2012-02-24 13:28:47

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

Deegan wrote:

Here are the 2 LUA big_smile

dt-FOIM.png

--- hmm:/


Looks interesting. Agree with ackernan - conkyForecast does not work! <<--- error?
Sembra interessante. Concordo con ackernan - conkyForecast non funziona! <<--- errore?

New posts  Active topics  Unanswered topics  New messages

Top of page see: New Messages - you have one.  Please look.
Inizio pagina vedi: New Messages - Avete uno.  vedi prego

Last edited by Sector11 (2012-02-24 13:36:20)


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#587 2012-02-24 18:52:23

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

Re: Conky v1.9 Thread

the first incarnation of interactive weather

http://youtu.be/bnLjaVPU_Ds

this is an interactive template script that works alongside v9000.lua

no changes to v9000.lua or .v9000_config.lua are required (apart from initial setup of the config of course)

here is the template
http://dl.dropbox.com/u/19008369/weathe … lua.tar.gz

get the v9000 archive from the weather in conky thread and follow the readme to get it working

put this template into the v9000 folder then edit conky_weather to point to "weather_interactive.lua" instead of "weather_testing.lua"

you need xdotool installed and xwininfo (which you most likely have)

everything open on my eeepc, i get cpu at 4% when all closed down 1%
the less you see the lower the % smile

Last edited by mrpeachy (2012-02-24 19:09:03)

Offline

#588 2012-02-24 19:18:48

lain
#! Junkie
Registered: 2011-11-03
Posts: 313

Re: Conky v1.9 Thread

@mrpeachy

Wow. That's the first interactive conky I saw. But isn't that a bit complicated? All that sounds like it would be easier to hack around in the conky-source to make it able to pass some mouse-pointer-info's to a lua-script.
Just sayin'


#! Chrome Extension
Uh... I'm supposed to share my deep insights here, right?

Offline

#589 2012-02-24 20:29:36

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

Re: Conky v1.9 Thread

mrpeachy wrote:

the first incarnation of interactive weather

http://youtu.be/bnLjaVPU_Ds

this is an interactive template script that works alongside v9000.lua

no changes to v9000.lua or .v9000_config.lua are required (apart from initial setup of the config of course)

here is the template
http://dl.dropbox.com/u/19008369/weathe … lua.tar.gz

This is AWESOME!! Can't wait to add it!!

Offline

#590 2012-02-24 20:35:09

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

Re: Conky v1.9 Thread

@ Iain
well i would have no idea about how to alter the conky program
the mechanism is actually quite simple
the number of files involved is because its weather and needs those other files to get the info

@falldown
thanks!

NOTE you might need to add this line to your conky settings

own_window_title conky_weather

Offline

#591 2012-02-24 21:24:09

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

Re: Conky v1.9 Thread

MrPeachy I am getting this error in terminal:

Conky: llua_do_call: function conky_weather execution failed: /home/falldown/v9000/weather_interactive.lua:259: attempt to perform arithmetic on global 'mousex' (a nil value)

curl loads fine and then I just get a weather button that I can't click.

Offline

#592 2012-02-24 21:39:20

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

Re: Conky v1.9 Thread

falldown wrote:

MrPeachy I am getting this error in terminal:

Conky: llua_do_call: function conky_weather execution failed: /home/falldown/v9000/weather_interactive.lua:259: attempt to perform arithmetic on global 'mousex' (a nil value)

curl loads fine and then I just get a weather button that I can't click.

hmm... line 241 in the template is this

geometry=string.gsub(geometry,"[\n]","")

put a print command underneat like this

geometry=string.gsub(geometry,"[\n]","")
print (geometry)

and line 255, add a print for click

if click==nil then click="x:0 y:0 " end
print (click)

and see what you get in the terminal when you start the script

Last edited by mrpeachy (2012-02-24 21:43:29)

Offline

#593 2012-02-24 21:50:07

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

Re: Conky v1.9 Thread

and also chech your tmp directory for the xdo file and see whats in it

sometimes tmp isnt the best place to save things to, you could edit the code to point to a different location at around the same lines as posted above

Offline

#594 2012-02-24 21:50:54

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

Re: Conky v1.9 Thread

^ here is the new terminal message

Conky: llua_do_call: function conky_weather execution failed: /home/falldown/v9000/weather_interactive.lua:261: attempt to perform arithmetic on global 'mousex' (a nil value)
x:0 y:0 
x:0 y:0 

x:0 y:0 is endless..
as if it isn't reading my mouse..

EDIT: xdo file is blank

Last edited by falldown (2012-02-24 21:54:02)

Offline

#595 2012-02-24 22:00:24

Oliviakrk
Member
From: Europe
Registered: 2012-02-03
Posts: 29
Website

Re: Conky v1.9 Thread

kri5 wrote:

Sector11 wrote:
tY3V0Nw


Nice one. Could you upload your config??


Waldorf
ASUS N53SN

Offline

#596 2012-02-24 22:07:49

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

Re: Conky v1.9 Thread

falldown wrote:

^ here is the new terminal message

Conky: llua_do_call: function conky_weather execution failed: /home/falldown/v9000/weather_interactive.lua:261: attempt to perform arithmetic on global 'mousex' (a nil value)
x:0 y:0 
x:0 y:0 

x:0 y:0 is endless..
as if it isn't reading my mouse..

EDIT: xdo file is blank

did you add the

own_window_title conky_weather

to the conky_weather conkyrc?

run conky_weather

look at line 236 or there abouts

os.execute("xdotool search --name conky_weather behave %@ mouse-click getmouselocation >> /tmp/xdo &")

you could try running the conky_weather without the lua stuff loaded, ie commented out
then run

xdotool search --name conky_weather behave %@ mouse-click getmouselocation >> /tmp/xdo &

in a separate terminal

when you click on the conky window you should see something like this

findclient: 67108866
findclient: 67108866

Offline

#597 2012-02-24 22:40:44

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

Re: Conky v1.9 Thread

mrpeachy wrote:

did you add the

own_window_title conky_weather

to the conky_weather conkyrc?

yes.. I followed your directions this time smile

mrpeachy wrote:

run conky_weather

look at line 236 or there abouts

os.execute("xdotool search --name conky_weather behave %@ mouse-click getmouselocation >> /tmp/xdo &")

you could try running the conky_weather without the lua stuff loaded, ie commented out
then run

like its just getting one coordinate. 
xdotool search --name conky_weather behave %@ mouse-click getmouselocation >> /tmp/xdo &

in a separate terminal

when you click on the conky window you should see something like this

findclient: 67108866
findclient: 67108866

I get this

falldown@vaio:~$ xdotool search --name conky_weather behave %@ mouse-click getmouselocation >> /tmp/xdo &
[1] 1814

Offline

#598 2012-02-24 22:42:14

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

Re: Conky v1.9 Thread

do you get anything written to tmp/xdo?

Offline

#599 2012-02-24 22:45:00

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

Re: Conky v1.9 Thread

* If none of --title, --class, and --name are specified,
the defaults are to match any of them.
Usage: xdotool search [options] regexp_pattern
 --class         check regexp_pattern agains the window class
 --maxdepth N    set search depth to N. Default is infinite.
 --name          check regexp_pattern agains the window name
 --onlyvisible   matches only windows currently visible
 --pid PID       only show windows belonging to specific process
                 Not supported by all X11 applications --screen N      only search a specific screen. Default is all screens
 --title         check regexp_pattern agains the window title
                 -1 also means infinite.
 -h, --help      show this help output

just this usage info.. it keeps repeating itself.

EDIT: New error now

Absolute upper-left X:  5  Absolute upper-left Y:  5
Usage: xdotool search [options] regexp_pattern
Conky: llua_do_call: function conky_weather execution failed: /home/falldown/v9000/weather_interactive.lua:261: attempt to perform arithmetic on global 'mousex' (a nil value)
x:0 y:0 
x:0 y:0 

Last edited by falldown (2012-02-24 22:54:34)

Offline

Help fund CrunchBang, donate to the project!

#600 2012-02-24 23:19:45

kri5
#! Die Hard
From: L.G.C. UK
Registered: 2011-11-10
Posts: 568

Re: Conky v1.9 Thread

@oliviakrk..

Glad you like my Conky set up, there has been a slight change with the shortcut keys as shown below:

b0f88c176610739.jpg

Not sure if you are already aware but they are multiple Conky's, if you know about them already then jolly good, if not information about setting up multiple Conky's can be found at:

http://crunchbanglinux.org/wiki/howto/h … y_sessions

I have a total of 11 .conkyrc files, I can supply all of them if you wish or if there is a specific part of my setup you like I can supply just those parts.

Regards Kri5


#! Waldorf - 64bit - Xfce

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.
Server: acrobat

Debian Logo