SEARCH

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

You are not logged in.

#3276 2012-10-13 16:29:12

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 11,287
Website

Re: The New Monster Conky Thread

@ lionhead & falldown

In my rss conky I use:

minimum_size 0 0 ##420 420   ## width, height
#maximum_width 0     ##420       ## width

And it works find with my rss conky BUT you may not want things to go as wide as that when they have looooooooooooong headlines.

However I open it - read it  - close it.
I should make it a windowed conky... hmmmmmmmmmm

@ pvsage
Try as I might the fold function doesn't want to work with conky's ${rss} command.  sad

###  Begin Window Settings  ##################################################
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
#own_window_colour gray
own_window_class Conky
own_window_title RSS

# 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 normal
 own_window_argb_visual no # Options: yes or no

### When ARGB visuals are enabled, this use this to modify the alpha value
### Use: own_window_type normal
### Use: own_window_transparent no
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
# own_window_argb_value 0

minimum_size 0 0 ##420 420   ## width, height
#maximum_width 0     ##420       ## width

gap_x 10 #15        ### left &right
gap_y 10        ### up & down

alignment tl #ml
####################################################  End Window Settings  ###
###  Font Settings  ##########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont Anonymous Pro:size=9
# X font when Xft is disabled, you can pick one with program xfontsel
#font 5x7
#font 6x10
#font 7x13
#font 8x13
#font 9x15
#font *mintsmild.se*
#font -*-*-*-*-*-*-34-*-*-*-*-*-*-*

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

uppercase no
######################################################  End Font Settings  ###
###  Color Settings  #########################################################
draw_shades no
default_shade_color black

draw_outline no # amplifies text if yes
default_outline_color black

default_color DCDCDC #220 220 220    Gainsboro
color0 8FBC8F #143 188 143    DarkSeaGreen
color1 778899 #119 136 153    LightSlateGray
color2 FF8C00 #255 140   0    DarkOrange
color3 7FFF00 #127 255   0    Chartreuse
color4 FFA07A #255 160 122    LightSalmon
color5 FFDEAD #255 222 173    NavajoWhite
color6 00BFFF #  0 191 255    DeepSkyBlue
color7 00FFFF #  0 255 255    Cyan
color8 FFFF00 #255 255   0    Yellow
color9 B22222 #178  34  34    FireBrick
#####################################################  End Color Settings  ###
###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 10
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders yes #no
#default_graph_size 15 40
#####################################################  End Borders Secton  ###
###  Miscellaneous Section  ##################################################
# Boolean value, if true, Conky will be forked to background when started.
background yes

# 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

#   Maximum size of user text buffer, i.e. layout below TEXT line in config file
#  (default is 16384 bytes)
# max_user_text 16384

# Desired output unit of all objects displaying a temperature. Parameters are
# either "fahrenheit" or "celsius". The default unit is degree Celsius.
# temperature_unit Fahrenheit

##############################################  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 125 0 0 0 0 0x000000 0.3}
#
## ${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 20 0 0 0 0 0x000000 0.5
# lua_draw_hook_post draw_bg 20 0 0 0 0 0x000000 0.5
#
# TEXT
#
#######################################################  End LUA Settings  ###
# 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
${font Anonymous Pro:bold:size=9}${color3}CBC Top Stories
http://rss.cbc.ca/lineup/topstories.xml${color}${font}
${rss http://rss.cbc.ca/lineup/topstories.xml?output=rss 10 item_titles 15}

${font Anonymous Pro:bold:size=9}${color7}BBC News - World
http://feeds.bbci.co.uk/news/world/rss.xml${color}${font}
${rss http://feeds.bbci.co.uk/news/world/rss.xml?output=rss 10 item_titles 15}

${font Anonymous Pro:bold:size=9}${color6}CNN.com - Top Stories
http://rss.cnn.com/rss/edition.rss${color}${font}
${rss http://rss.cnn.com/rss/edition.rss?output=rss 10 item_titles 15}

${font Anonymous Pro:bold:size=9}${color2}News From Argentina
http://www.argentinaindependent.com/${color}${font}
${rss http://www.argentinaindependent.com/category/currentaffairs/newsfromargentina/feed/?output=rss 10 item_titles 15}

adiQiD7c.jpg


To #! or not to #! that is the question!
#! Conky = 13 Threads & the Conky Archives | Conky PitStop | OHCG'er
#! Forum Moderator   |   StartPage -  protect your privacy   |   BBQ Linux

Online

Be excellent to each other!

#3277 2012-10-13 16:43:17

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

Re: The New Monster Conky Thread

Sector11 wrote:

@ pvsage
Try as I might the fold function doesn't want to work with conky's ${rss} command.  sad

That is because you can't use fold in ${rss} and you can't use ${rss} inside a ${exec}.
I explained the reasons why a couple of months ago when I wrote my wordwrap_rss script.

Offline

#3278 2012-10-13 16:47:47

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 11,287
Website

Re: The New Monster Conky Thread

arclance wrote:

This is an example of how to use it in a .conkyrc.

${lua_parse rss_wrap http://news.google.com/?output=rss 3 item_titles 50 7}

Have not tried that yet, does it handle 'space' like fold?

| fold -s -w 20
       -s, --spaces
              break at spaces

       -w, --width=WIDTH
              use WIDTH columns instead of 80

To #! or not to #! that is the question!
#! Conky = 13 Threads & the Conky Archives | Conky PitStop | OHCG'er
#! Forum Moderator   |   StartPage -  protect your privacy   |   BBQ Linux

Online

#3279 2012-10-13 16:50:00

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 12,086

Re: The New Monster Conky Thread

^ & ^^ - D'oh!  Didn't realize you were talking about a built-in Conky function; I was thinking $exec.  (Fold was what I used with the CLI weather script before the forecast function broke.)


I'm a moderator here.  How are we doing?  Feedback is encouraged.

Online

#3280 2012-10-13 16:51:57

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 11,287
Website

Re: The New Monster Conky Thread

arclance wrote:
Sector11 wrote:

@ pvsage
Try as I might the fold function doesn't want to work with conky's ${rss} command.  sad

That is because you can't use fold in ${rss} and you can't use ${rss} inside a ${exec}.
I explained the reasons why a couple of months ago when I wrote my wordwrap_rss script.

Never saw that - sorry.


To #! or not to #! that is the question!
#! Conky = 13 Threads & the Conky Archives | Conky PitStop | OHCG'er
#! Forum Moderator   |   StartPage -  protect your privacy   |   BBQ Linux

Online

#3281 2012-10-13 16:52:40

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

Re: The New Monster Conky Thread

Sector11 wrote:
arclance wrote:

This is an example of how to use it in a .conkyrc.

${lua_parse rss_wrap http://news.google.com/?output=rss 3 item_titles 50 7}

Have not tried that yet, does it handle 'space' like fold?

I doubt it.
What does "-s" do, only split on spaces so words don't get cut in half?

Offline

#3282 2012-10-13 17:48:33

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 11,287
Website

Re: The New Monster Conky Thread

pvsage wrote:

^ & ^^ - D'oh!  Didn't realize you were talking about a built-in Conky function; I was thinking $exec.  (Fold was what I used with the CLI weather script before the forecast function broke.)

Don't feel bad I use fold with other things and tried with ${rss} how was I to know it wouldn't work.  Had I not tried it, I would have offered the same advice.

Now to try arclances's script.

Talking weather ...

  13 Oct 12 | 14:44:25 ~
         $ now
WEATHER:
     Now: Partly Sunny, 21C
   Today: 0-0 C                
Tomorrow: 0-0 C                
  13 Oct 12 | 14:44:29 ~
         $ 

Today and Tomorrow use to work.... any bash gurus out there?

alias now='acc_w_2.sh "SAM|AR|AR007|BUENOSAIRES"'

acc_w_2.sh

# !/usr/bin/bash
METRIC=1 #Should be 0 or 1; 0 for F, 1 for C
if [ -z $1 ]; then
    echo "USAGE: weather.sh <locationcode>"
    exit 0;
fi

#    printf("WEATHER:\nNow: %s\nToday: %s\nTomorrow: %s",CurWeather,forecast[1],forecast[2])
#    printf("WEATHER: %s\n%s\n%s",CurWeather,forecast[1],forecast[2])

wget -q http://rss.accuweather.com/rss/liveweather_rss.asp\?metric\=${METRIC}\&locCode\=$1 -O - | awk \
'/Currently:/ {CurWeather=$0}
/[0-9] Forecast<\/title>/ {nr=NR+5}
NR==nr    {postIndx[++x]=$0}
# x>2    {exit}
END{
    split(CurWeather,tmp,"Currently: ")
    split(tmp[2],tmp1,"<")
    CurWeather=sprintf("%s",tmp1[1])
    sub(":",",",CurWeather)
    for(x in postIndx){
    split(postIndx[x],tmp,";|&")
    split(tmp[1],tmp,">")
    split(tmp[2],statement," C ") # substitute C for F if metric differs
    split(tmp[2],temp)
    forecast[++y]=sprintf("%d-%d C %-15s",temp[5],temp[2],statement[3])
    }
    printf("WEATHER:\n     Now: %s\n   Today: %s\nTomorrow: %s",CurWeather,forecast[1],forecast[2])
}'

To #! or not to #! that is the question!
#! Conky = 13 Threads & the Conky Archives | Conky PitStop | OHCG'er
#! Forum Moderator   |   StartPage -  protect your privacy   |   BBQ Linux

Online

#3283 2012-10-13 17:52:32

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 11,287
Website

Re: The New Monster Conky Thread

arclance wrote:
Sector11 wrote:
arclance wrote:

This is an example of how to use it in a .conkyrc.

${lua_parse rss_wrap http://news.google.com/?output=rss 3 item_titles 50 7}

Have not tried that yet, does it handle 'space' like fold?

I doubt it.
What does "-s" do, only split on spaces so words don't get cut in half?

Yup, see my edit

It will cut on the first space before the -w flag.


To #! or not to #! that is the question!
#! Conky = 13 Threads & the Conky Archives | Conky PitStop | OHCG'er
#! Forum Moderator   |   StartPage -  protect your privacy   |   BBQ Linux

Online

#3284 2012-10-13 18:29:34

VastOne
#! Ranger
From: #! Fringe Division
Registered: 2011-04-26
Posts: 10,163
Website

Re: The New Monster Conky Thread

Answering a scrot or it did not happen challenge

Been doing some Tint2 work and managed to get a Panel/Dock/Taskbar/Systray/Clock/Battery/Launcher down to running and staying at 8MiB ...  This is no different than those like cairo-dock or docky or even lxpanel that runs anywhere from 40 to 80 MiB and leaks like a sieve...

screenshot-10132012-012501pm.php


VSIDO | SolusOS

Words That Build Or Destroy

Offline

#3285 2012-10-13 19:40:25

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 11,287
Website

Re: The New Monster Conky Thread

VastOne wrote:

Answering a scrot or it did not happen challenge

Been doing some Tint2 work and managed to get a Panel/Dock/Taskbar/Systray/Clock/Battery/Launcher down to running and staying at 8MiB ...  This is no different than those like cairo-dock or docky or even lxpanel that runs anywhere from 40 to 80 MiB and leaks like a sieve...

Who be so silly to challenge!  lol

sieve?  Good for washing veggies - not for computers though.

Cool!  How do you tell which desktop you're on, or do you only use one?

Last edited by Sector11 (2012-10-13 19:41:56)


To #! or not to #! that is the question!
#! Conky = 13 Threads & the Conky Archives | Conky PitStop | OHCG'er
#! Forum Moderator   |   StartPage -  protect your privacy   |   BBQ Linux

Online

#3286 2012-10-13 19:43:47

VastOne
#! Ranger
From: #! Fringe Division
Registered: 2011-04-26
Posts: 10,163
Website

Re: The New Monster Conky Thread

^ I only use one, of course you can add it if you want/need it.


VSIDO | SolusOS

Words That Build Or Destroy

Offline

#3287 2012-10-13 20:17:17

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

Re: The New Monster Conky Thread

Sector11 wrote:
arclance wrote:
Sector11 wrote:

Have not tried that yet, does it handle 'space' like fold?

I doubt it.
What does "-s" do, only split on spaces so words don't get cut in half?

Yup, see my edit

What edit?
That post has not been edited.

Sector11 wrote:

It will cut on the first space before the -w flag.

What do you mean by this?
Do you mean it will wrap at the last space in each "-w" argument length section or something else?

To clarify about the post you linked

Sector11 wrote:
arclance wrote:

This is an example of how to use it in a .conkyrc.

${lua_parse rss_wrap http://news.google.com/?output=rss 3 item_titles 50 7}

Have not tried that yet, does it handle 'space' like fold?

| fold -s -w 20
       -s, --spaces
              break at spaces

       -w, --width=WIDTH
              use WIDTH columns instead of 80

I wanted to know if "break at spaces" meant wrap at every space or the last space in the wrap width since the description does not say which and both could be desired functions.

I could make the script do either but it would have to wait until tomorrow.

This is what it looks like now.
abkZfRUb.jpg

Last edited by arclance (2012-10-13 20:20:28)

Offline

#3288 2012-10-13 20:45:55

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

Re: The New Monster Conky Thread

this is where an organized file system would come in handy... ive written several wrap function (that split on spaces and based on character number and pixel length)
but i keep having to re-write them because i cant find the original big_smile

Offline

#3289 2012-10-13 20:57:38

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

Re: The New Monster Conky Thread

^ I know how I would do it, I am just brunt out from taking the Chemistry GRE today.
I can do it using some tricks I came up with for the scrolling weather alert line from my weather script.
At least the rss strings don't need this kind of crazy preprocessing like the weather alerts.

weatherData.Alerts[i]['message']:gsub("\u000A","\n"):gsub("\n ","\n"):gsub(" \n","\n"):gsub("\n\n\n\n\n\n","\n"):gsub("\n\n\n\n\n","\n"):gsub("\n\n\n\n","\n"):gsub("\n\n\n","\n"):gsub("\n\n","\n"):gsub("\n","",1)

Offline

#3290 2012-10-13 21:32:53

VastOne
#! Ranger
From: #! Fringe Division
Registered: 2011-04-26
Posts: 10,163
Website

Re: The New Monster Conky Thread

^ those damn Chemistry GRE's.... big_smile


VSIDO | SolusOS

Words That Build Or Destroy

Offline

#3291 2012-10-13 22:27:24

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 11,287
Website

Re: The New Monster Conky Thread

@ arclance

I've had a LONG day I had multiple windows open at the same time. I added that bottom bit to the post (copy pasted from the man page for -s and -w) thinking I was editing, sorry for the mixup.

The man page for "fold" simply says:

       -s, --spaces
              break at spaces

       -w, --width=WIDTH
              use WIDTH columns instead of 80

However this did answer your question:

Sector11 wrote:

It will cut on the first space before the -w flag.

No fold

12345678901234567890
now is the time for all good men to come to the aid of their country!

| fold -w 13

12345678901234567890
now is the ti
me for all go
od men to com
e to the aid 
of their coun
try!

| fold -s -w 13

12345678901234567890
now is the
time for all 
good men to 
come to the
aid of their 
country!

acsqmIuM.jpg


To #! or not to #! that is the question!
#! Conky = 13 Threads & the Conky Archives | Conky PitStop | OHCG'er
#! Forum Moderator   |   StartPage -  protect your privacy   |   BBQ Linux

Online

#3292 2012-10-13 22:37:37

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

Re: The New Monster Conky Thread

Sector11 wrote:

However this did answer your question:

Sector11 wrote:

It will cut on the first space before the -w flag.

Perhaps but you worded it very poorly which is why I asked this.

arclance wrote:
Sector11 wrote:

It will cut on the first space before the -w flag.

What do you mean by this?
Do you mean it will wrap at the last space in each "-w" argument length section or something else?

Since that sentence seems to imply that there should be "-w"s in the line that you are going to wrap that indicate the end of each wrap length section instead of what you meant which was "wraps at the last space before the character length set by the -w flag".

Offline

#3293 2012-10-13 22:59:46

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

Re: The New Monster Conky Thread

reinventing the wheel again...
this can do wraps at spaces for any single line

function conky_wrap(ttab)
--#########################################################################################################
ttab=loadstring("return "..ttab)()
tt=ttab[1] or "test text"
if string.find(tt,"${")==1 then
tt=conky_parse(tt)
end
cut=ttab[2] or 11
wtab={}
ltab={}
--split line into words and get word length
for word in tt:gmatch("%w+") do
table.insert(wtab,word) 
table.insert(ltab,string.len(word)+1)
end
lines={}
remain=tt
add=0
n=1
while string.len(remain)>=cut do
    while add<=cut+1 do
    add=add+(ltab[n])
    n=n+1
    end
    if #wtab>1 then
    table.insert(lines,table.concat(wtab," ",1,n-2))
    else
    table.insert(lines,wtab[1])
    end
        for i=1,n-2 do
        table.remove(wtab,1)
        end
    remain=table.concat(wtab," ")    
end
table.insert(lines,remain)
--#########################################################################################################
return table.concat(lines,"\n")
end--end main function
lua_load ~/conky/lua/wrap.lua

TEXT
${lua_parse wrap {"${rss http://rss.cbc.ca/lineup/topstories.xml?output=rss 1 item_title 1}",30}}

ill keep this script where i can find it and see if i cant make it more optimal/versatile

Last edited by mrpeachy (2012-10-13 23:02:53)

Offline

#3294 2012-10-13 23:47:02

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 11,287
Website

Re: The New Monster Conky Thread

@ arcelance.

Im not going to play word games with you - read the fold manual!

Last edited by Sector11 (2012-10-13 23:47:18)


To #! or not to #! that is the question!
#! Conky = 13 Threads & the Conky Archives | Conky PitStop | OHCG'er
#! Forum Moderator   |   StartPage -  protect your privacy   |   BBQ Linux

Online

#3295 2012-10-14 00:08:40

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 11,287
Website

Re: The New Monster Conky Thread

mrpeachy wrote:

reinventing the wheel again...
this can do wraps at spaces for any single line

ill keep this script where i can find it and see if i cant make it more optimal/versatile

And if you ever loose it I'll have it.  big_smile
Thank you mrpeachy.


To #! or not to #! that is the question!
#! Conky = 13 Threads & the Conky Archives | Conky PitStop | OHCG'er
#! Forum Moderator   |   StartPage -  protect your privacy   |   BBQ Linux

Online

#3296 2012-10-14 00:16:19

lwfitz
#! Die Hard
From: Monrovia, CA
Registered: 2012-01-19
Posts: 886
Website

Re: The New Monster Conky Thread

Hey when using the isometric bars is there a way to change the font color for the font thats controlled by the lua script itself?

Offline

#3297 2012-10-14 00:18:16

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

Re: The New Monster Conky Thread

Here is my rss_wrap script which now wraps on the last space so it does not split the line in the middle of a word.

--[[ 
wordwrap_rss by arclance 
Created: 2012-08-22
Updated: 2012-10-13
Changelog
v1.1 2012-09-18
    Fix escaping of " characters in the RSS feed data

v1.2 2012-10-13
    wrap each line on the last space (" ") so words don't get cut in half.
########################################################################
wraps a line "longLine" to the charachter length defined by "wrapLength"
returns a list containg each wraped line in order
]]

function wordwrap(longLine, wrapLength)
    if #longLine <= wrapLength then --# return list containing input line if it is shorter than the wrap length
        return {longLine}
    end --# if #longLine <= wrapLength then
    local wrapedLines = {}
    local remLine = longLine
    local lineNum = 1
    while #remLine > 0 do
        if #remLine <= wrapLength then
            wrapedLines[lineNum] = remLine
            break
        else
            local s,f,front,back = string.find(remLine:sub(1,(1 + wrapLength)), "(.*)%s(.+)")
            wrapedLines[lineNum] = front
            remLine = back..remLine:sub((2 + wrapLength),#remLine)
        end --# if #remLine <= wrapLength then
        lineNum = lineNum + 1
    end --# while #remLine > 0 do
    return wrapedLines
end --# function wordwrap(longLine, wrapLength)

function conky_rss_wrap(uri, interval_in_minutes, action, wrapLength, num_par, spaces_in_front)
    local rssCommand = "${rss "..uri.." "..interval_in_minutes.." "..action
    if num_par ~= nil then
        rssCommand = rssCommand.." "..num_par
    end --# if num_par ~= nil then
    if spaces_in_front ~= nil then
        rssCommand = rssCommand.." "..spaces_in_front
    end --# if spaces_in_front ~= nil then
    local rssText = (conky_parse((rssCommand.."}"))):gsub(",",""):gsub('"','\\"'):gsub("\n",'","')
    local rssSplit = assert(loadstring('return {"'..rssText..'"}'))()
    local output = ""
    for j = 1, #rssSplit do
        local wrapedText = wordwrap(rssSplit[j], tonumber(wrapLength))
        for i = 1, #wrapedText do
            if output ~= "" then
                output = output.."\n"..wrapedText[i]
            else
                output = wrapedText[i]
            end --# if i ~= 1 then
        end --# for i = 1, #wrapedText do
    end --# for j = 1, #rssSplit do
    return output
end --# function rss_wrap()

This is the kind of output you get from it now.

Romney, Ryan Slam Obama Administration on China
Trade Policies - ABC News
Poll: Obama tied with Romney in
Republican-leaning Arizona - The Hill (blog)
Crowds, workers prepare for Endeavour's arrival
at California Science Center - Los Angeles Times
Notre Dame needs overtime for comeback win vs.
Stanford - USA TODAY
Syria Bans Turkish Airline Overflights - Voice of
America (blog)
Authorities say missing U of New Hampshire
student from Mass. is dead; suspect ... - Fox News
Column: Day of reckoning had to come for A-Rod -
Wall Street Journal

No screenshot this time, I am still to burnt out to make one.

Offline

#3298 2012-10-14 02:24:16

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 11,287
Website

Re: The New Monster Conky Thread

lwfitz wrote:

Hey when using the isometric bars is there a way to change the font color for the font thats controlled by the lua script itself?

I did it with my version of mrpeachy's "isometric_bars.lua"

I tried adding: "titlered, titlegreen, titleblue, titlealpha" to this and working it in and got LOST!

function bar3d(conkyobject, linethick, width, barheight, linered, linegreen, lineblue, linealpha, facered, facegreen, faceblue, facealpha, across, down, title, framelines, font, fontsize, txtacross, txtdown)

So I just changed the colours here, however it means one universal colour throughout:

--title
cairo_select_font_face (cr, font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, fontsize);
cairo_set_source_rgba (cr, 0.9, 0.9, 0.9, 1.0);
cairo_translate (cr, txtacross, txtdown)
cairo_move_to (cr, 0, 0)
cairo_show_text (cr, title)
cairo_translate (cr, -txtacross, -txtdown)

cairo_set_source_rgba (cr, 0.9, 0.9, 0.9, 1.0); <<-- this line, can not remember what the  original was.  I think it was controlled by "linered, linegreen, lineblue, linealpha" originally.

And mrpeachy though I was going to take over his work HA HA HA!!!!!


To #! or not to #! that is the question!
#! Conky = 13 Threads & the Conky Archives | Conky PitStop | OHCG'er
#! Forum Moderator   |   StartPage -  protect your privacy   |   BBQ Linux

Online

#3299 2012-10-14 02:30:02

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

Re: The New Monster Conky Thread

Sector11 wrote:
lwfitz wrote:

Hey when using the isometric bars is there a way to change the font color for the font thats controlled by the lua script itself?

I did it with my version of mrpeachy's "isometric_bars.lua"

I tried adding: "titlered, titlegreen, titleblue, titlealpha" to this and working it in and got LOST!

function bar3d(conkyobject, linethick, width, barheight, linered, linegreen, lineblue, linealpha, facered, facegreen, faceblue, facealpha, across, down, title, framelines, font, fontsize, txtacross, txtdown)

So I just changed the colours here, however it means one universal colour throughout:

--title
cairo_select_font_face (cr, font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, fontsize);
cairo_set_source_rgba (cr, 0.9, 0.9, 0.9, 1.0);
cairo_translate (cr, txtacross, txtdown)
cairo_move_to (cr, 0, 0)
cairo_show_text (cr, title)
cairo_translate (cr, -txtacross, -txtdown)

cairo_set_source_rgba (cr, 0.9, 0.9, 0.9, 1.0); <<-- this line, can not remember what the  original was.  I think it was controlled by "linered, linegreen, lineblue, linealpha" originally.

And mrpeachy though I was going to take over his work HA HA HA!!!!!

the above approach will work, add them in at the end of the function setup

function bar3d(conkyobject, linethick, width, barheight, linered, linegreen, lineblue, linealpha, facered, facegreen, faceblue, facealpha, across, down, title, framelines, font, fontsize, txtacross, txtdown, titlered, titlegreen, titleblue, titlealpha)

then set up the variable values at the end of the function call line

then in the drawing function

--title
cairo_select_font_face (cr, font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, fontsize);
cairo_set_source_rgba (cr, titlered, titlegreen, titleblue, titlealpha);

Last edited by mrpeachy (2012-10-14 02:31:09)

Offline

Be excellent to each other!

#3300 2012-10-14 02:43:24

lwfitz
#! Die Hard
From: Monrovia, CA
Registered: 2012-01-19
Posts: 886
Website

Re: The New Monster Conky Thread

Awesome thanks mrpeachy and Sector11

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