Re: Conky Help

These lines in conky will extract the headlines from news.yahoo.com
it depends on how variable the site is to whether this will always work...

http://omploader.org/tNTBrdQ

you could probably successfully scroll each line i would think (you would want to remove the fold command from each line before scrolling it)

TOP STORIES
${font Sans:size=10}${color1}${execi 60 curl 'http://news.yahoo.com' | grep -n '<!-- COKE -->' | sed -n 1p | awk -F'<!-- COKE -->' '{print $1}' | awk -F'                                                                ' '{print $2}' | sed "s|&#039;|'|g" | sed 's|&quot;|"|g' | sed 's|&#151;|-|g' | fold -sw 40}

${font Sans:size=10}${color1}${execi 60 curl 'http://news.yahoo.com' | grep -n '<!-- COKE -->' | sed -n 2p | awk -F'<!-- COKE -->' '{print $1}' | awk -F'                                                                                                ' '{print $2}' | sed "s|&#039;|'|g" | sed 's|&quot;|"|g' | sed 's|&#151;|-|g' | fold -sw 40}

${font Sans:size=10}${color1}${execi 60 curl 'http://news.yahoo.com' | grep -n '<!-- COKE -->' | sed -n 3p | awk -F'<!-- COKE -->' '{print $1}' | awk -F'                                                                                                ' '{print $2}' | sed "s|&#039;|'|g" | sed 's|&quot;|"|g' | sed 's|&#151;|-|g' | fold -sw 40}

OTHER NEWS

${font Sans:size=10}${color1}${execi 60 curl 'http://news.yahoo.com' | grep -n '<!-- COKE -->' | sed -n 4p | awk -F'<!-- COKE -->' '{print $1}' | awk -F'"> ' '{print $2}' | sed "s|&#039;|'|g" | sed 's|&quot;|"|g' | sed 's|&#151;|-|g' | fold -sw 40}

${font Sans:size=10}${color1}${execi 60 curl 'http://news.yahoo.com' | grep -n '<!-- COKE -->' | sed -n 4p | awk -F'<!-- COKE -->' '{print $2}' | awk -F'"> ' '{print $2}' | sed "s|&#039;|'|g" | sed 's|&quot;|"|g' | sed 's|&#151;|-|g' | fold -sw 40}

${font Sans:size=10}${color1}${execi 60 curl 'http://news.yahoo.com' | grep -n '<!-- COKE -->' | sed -n 4p | awk -F'<!-- COKE -->' '{print $3}' | awk -F'"> ' '{print $2}' | sed "s|&#039;|'|g" | sed 's|&quot;|"|g' | sed 's|&#151;|-|g' | fold -sw 40}

${font Sans:size=10}${color1}${execi 60 curl 'http://news.yahoo.com' | grep -n '<!-- COKE -->' | sed -n 4p | awk -F'<!-- COKE -->' '{print $4}' | awk -F'"> ' '{print $2}' | sed "s|&#039;|'|g" | sed 's|&quot;|"|g' | sed 's|&#151;|-|g' | fold -sw 40}

${font Sans:size=10}${color1}${execi 60 curl 'http://news.yahoo.com' | grep -n '<!-- COKE -->' | sed -n 4p | awk -F'<!-- COKE -->' '{print $5}' | awk -F'"> ' '{print $2}' | sed "s|&#039;|'|g" | sed 's|&quot;|"|g' | sed 's|&#151;|-|g' | fold -sw 40}

Last edited by mrpeachy (2010-07-23 00:30:48)

It's hard to find something if you don't know what you're looking for.
I have a blog, it's mostly about conky and lua stuff... go here.

Re: Conky Help

or here is another way

save this script somewhere: such as "rssnewsfeed.sh"
and make it executable

UPDATE!! - had to change some stuff when i noticed that the scroll wasnt updating -- corected below

#!/bin/bash
#!/bin/bash

{
curl http://rss.news.yahoo.com/rss/topstories
}>/tmp/topstories.html

{
cat /tmp/topstories.html | grep -n '<title>' | sed -n 3p | awk -F'<title>' '{print $2}' | sed "s|&#039;|'|g" | sed 's|&quot;|"|g' | sed 's|&#151;|-|g' 
cat /tmp/topstories.html | grep -n '<title>' | sed -n 4p | awk -F'<title>' '{print $2}' | sed "s|&#039;|'|g" | sed 's|&quot;|"|g' | sed 's|&#151;|-|g' 
cat /tmp/topstories.html | grep -n '<title>' | sed -n 5p | awk -F'<title>' '{print $2}' | sed "s|&#039;|'|g" | sed 's|&quot;|"|g' | sed 's|&#151;|-|g' 
cat /tmp/topstories.html | grep -n '<title>' | sed -n 6p | awk -F'<title>' '{print $2}' | sed "s|&#039;|'|g" | sed 's|&quot;|"|g' | sed 's|&#151;|-|g' 
cat /tmp/topstories.html | grep -n '<title>' | sed -n 7p | awk -F'<title>' '{print $2}' | sed "s|&#039;|'|g" | sed 's|&quot;|"|g' | sed 's|&#151;|-|g' 
cat /tmp/topstories.html | grep -n '<title>' | sed -n 8p | awk -F'<title>' '{print $2}' | sed "s|&#039;|'|g" | sed 's|&quot;|"|g' | sed 's|&#151;|-|g' 
}>/tmp/newsfeed.txt

{
sed 's/$/ ... /' /tmp/newsfeed.txt | tr -d '&#91;\012&#93;'
}>/tmp/newsfeedsingle.txt

cat /tmp/newsfeedsingle.txt

then in conky:

${scroll 40 5 ${execi 60 ~path to script~/rssnewsfeed.sh}}

then you get a single scrolling line with as many headlines as you like, each headline seperated by ... from the next

edit rssnewsfeed.sh and add or remove the lines that look like:
cat /tmp/topstories.html | grep -n '<title>' | sed -n 3p | awk -F'<title>' '{print $2}' | sed "s|&#039;|'|g" | sed 's|&quot;|"|g' | sed 's|&#151;|-|g'

if you add lines make sure you change "sed -n (number)p" to increase

your own conky news ticker!

Last edited by mrpeachy (2010-07-23 03:51:30)

It's hard to find something if you don't know what you're looking for.
I have a blog, it's mostly about conky and lua stuff... go here.

Re: Conky Help

Thank you for all your help Mr. Peachy!  I have been away from home for several days.  I can't wait to try it when I get back.  I will post here on my results when I have a chance to play around with it.

Proceed with confidence!
http://eldervlacoste.deviantart.com/

Re: Conky Help

ElderV.LaCoste wrote:

Thank you for all your help Mr. Peachy!  I have been away from home for several days.  I can't wait to try it when I get back.  I will post here on my results when I have a chance to play around with it.

your quite welcome... i think the second way (using bash script) is the best way to achieve what i think you wanted...
the only problems i have had so far is that the scroll can make my conky window flicker, and the scroll stops when the script is being executed

also I saw that a headline on the yahoo site started with the number "1" but in the conky the number was missing.

maybe try replacing this line:

sed 's/$/ ... /' /tmp/newsfeed.txt | tr -d '&#91;\012&#93;'

with a simpler version

sed 's/$/ ... /' /tmp/newsfeed.txt | tr -d '\n'

i just lifted the original line from a post i read, but i cant say that i understand the  '&#91;\012&#93;' part... something to do with special characters
maybe someone better versed in coding could tell us if it was this line responsible for removing the "1"

also more options may need to be added to compensate for the html code for various punctuation symbols

It's hard to find something if you don't know what you're looking for.
I have a blog, it's mostly about conky and lua stuff... go here.

Re: Conky Help

Thanks again for your help Mr. Peachy.  It works exactly how I want it to.  I did try to substitute a CNN feed but I got some "junk" in between the headlines.  That's ok, I am happy with using yahoo for now.  My goal was to keep the screen looking clean as possible and I thought if I could just have one line for news that would cut down on the clutter.  I think it works(real minimalists will probably find this intolerably "busy" but I like it) .  Here is a screenshot:

http://img269.imageshack.us/img269/6788/20100730094416832x624sc.th.png

Uploaded with ImageShack.us

Proceed with confidence!
http://eldervlacoste.deviantart.com/

Re: Conky Help

ElderV.LaCoste wrote:

Thanks again for your help Mr. Peachy.  It works exactly how I want it to.  I did try to substitute a CNN feed but I got some "junk" in between the headlines.  That's ok, I am happy with using yahoo for now.  My goal was to keep the screen looking clean as possible and I thought if I could just have one line for news that would cut down on the clutter.  I think it works(real minimalists will probably find this intolerably "busy" but I like it) .

Glad it's working for you!
Unfortunately the script will be site specific (as every site/feed will have its html written differently).

The script works by looking at the html, identifying specific phrases and using those to edit the code and "extract" the relevant information.

Last edited by mrpeachy (2010-07-30 15:45:24)

It's hard to find something if you don't know what you're looking for.
I have a blog, it's mostly about conky and lua stuff... go here.

732

Re: Conky Help

I'm going crazy about this. My conky doesn't show the whole month, see: http://www.broelling.dk/ss/conky_04082010.png

The code I'm using:
---
${font CrimeFighter BB:size=11}${color Tan1}CALENDAR${color}:${font}

${alignc}${color3}${font Bitstream Vera Sans Mono:size=7}${execi 60 date +"%B %Y"}
${color ffffff}${font Bitstream Vera Sans Mono:size=7}${execpi 60 DJS=`date +%_d`; cal | sed '1d' | sed '/./!d' | sed 's/$/ /' | fold -w 21 | sed -n '/^.\{21\}/p' | sed 's/^/${alignc} /' | sed /" $DJS "/s/" $DJS "/" "'${color FF853F}'"$DJS"'${color ffffff}'" "/}${font}
---
Could somebody please help. I have searched everywhere, but couldn't find a solution.

"You bow to NOone..."

Re: Conky Help

steen wrote:

I'm going crazy about this. My conky doesn't show the whole month, see: http://www.broelling.dk/ss/conky_04082010.png

The code I'm using:
---
${font CrimeFighter BB:size=11}${color Tan1}CALENDAR${color}:${font}

${alignc}${color3}${font Bitstream Vera Sans Mono:size=7}${execi 60 date +"%B %Y"}
${color ffffff}${font Bitstream Vera Sans Mono:size=7}${execpi 60 DJS=`date +%_d`; cal | sed '1d' | sed '/./!d' | sed 's/$/ /' | fold -w 21 | sed -n '/^.\{21\}/p' | sed 's/^/${alignc} /' | sed /" $DJS "/s/" $DJS "/" "'${color FF853F}'"$DJS"'${color ffffff}'" "/}${font}
---
Could somebody please help. I have searched everywhere, but couldn't find a solution.

your line for calendar is the same as mine:

${execpi 60 DJS=`date +%_d`; cal | sed '1d' | sed '/./!d' | sed 's/$/ /' | fold -w 21 | sed -n '/^.\{21\}/p' | sed 's/^/${alignc} /' | sed /" $DJS "/s/" $DJS "/" "'${color ca9849}'"$DJS"'${color d9c8b8}'" "/}

and i get the whole month... so at least you know its not that!

maybe post your whole conkyrc in a code box?

Last edited by mrpeachy (2010-08-04 16:11:33)

It's hard to find something if you don't know what you're looking for.
I have a blog, it's mostly about conky and lua stuff... go here.

Re: Conky Help

steen wrote:

I'm going crazy about this. My conky doesn't show the whole month, see: http://www.broelling.dk/ss/conky_04082010.png

Could somebody please help. I have searched everywhere, but couldn't find a solution.

and @ mrpeachy as well

Has to do with the amount of text being displayed "by one command"

text_buffer_size
    Size of the standard text buffer (default is 256 bytes). This buffer is used for intermediary text, such as individual lines, output from $exec vars, and various other variables. Increasing the size of this buffer can drastically reduce Conky's performance, but will allow for more text display per variable. The size of this buffer cannot be smaller than the default value of 256 bytes.

So use at least 1024:

text_buffer_size 1024
TEXT

735

Re: Conky Help

Sector11 wrote:

So use at least 1024:

text_buffer_size 1024
TEXT

Well now I've tried text_buffer_size 4096 and all the way to 10000, but I still just get the same sad

"You bow to NOone..."

736

Re: Conky Help

mrpeachy wrote:

maybe post your whole conkyrc in a code box?

Okay:

# conky configuration
#
# The list of variables has been removed from this file in favour
# of keeping the documentation more maintainable.
# Check http://conky.sf.net for an up-to-date-list.
#
# For ideas about how to modify conky, please see:
# http://crunchbanglinux.org/forums/topic/59/my-conky-config/
#
# For help with conky, please see:
# http://crunchbanglinux.org/forums/topic/2047/conky-help/
#
# Enjoy! :)
##############################################
#  Settings
##############################################
background yes
use_xft yes
xftfont Sans:size=7
#xftfont snap:size=8
xftalpha 1
update_interval 1.0
total_run_times 0
own_window yes
own_window_transparent yes
own_window_type desktop
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 200 200
maximum_width 240
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color white
default_shade_color black
default_outline_color white
alignment top_right
gap_x 12
gap_y 12
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale no
text_buffer_size 10000
##############################################
#  Output
# Temp:${alignr}${cpu acpitemp}%
##############################################
TEXT
${font CrimeFighter BB:size=11}${color Tan1}SYSTEM INFO${color}:${font}

${color White}Linux: ${alignr}${kernel}
Host:${alignr}$nodename
Uptime:${alignr}$uptime
CPU0:${alignr}${cpu cpu0}%
CPU1:${alignr}${cpu cpu1}%
CPU2:${alignr}${cpu cpu3}%
CPU3:${alignr}${cpu cpu3}%
CPU Temp:${alignr}${execi 8 sensors | grep -A 1 'temp2' | cut -c 15-16}
RAM:${alignr}$mem/$memmax
/Swap:${alignr}$swap/$swapmax
/Home:${alignr}${fs_used /home}/${fs_size /home}
/Root:${alignr}${fs_used /root}/${fs_size /root}
Harddisk Temp:${alignr}${execi 10 hddtemp /dev/sda | cut -c 32-33}


${font CrimeFighter BB:size=11}${color Tan1}NETWORK${color}:${font}

IP:${alignr}${execi 3600 wget -O - http://ip.tupeux.com | tail}
LIP:${alignr}${addr eth0}
In:${alignr}${downspeed eth0}
Out:${alignr}${upspeed eth0}


${font CrimeFighter BB:size=11}${color Tan1}PROCESSES${color}:${font}

${top_mem name 1}${alignr}${top mem 1}%
${top_mem name 2}${alignr}${top mem 2}%
${top_mem name 3}${alignr}${top mem 3}%
${top_mem name 4}${alignr}${top mem 4}%


${font CrimeFighter BB:size=11}${color Tan1}CALENDAR${color}:${font}

${alignc}${color3}${font Bitstream Vera Sans Mono:size=7}${execi 60 date +"%B %Y"}
${color ffffff}${font Bitstream Vera Sans Mono:size=7}${execpi 60 DJS=`date +%_d`; cal | sed '1d' | sed '/./!d' | sed 's/$/ /' | fold -w 21 | sed -n '/^.\{21\}/p' | sed 's/^/${alignc} /' | sed /" $DJS "/s/" $DJS "/" "'${color FF853F}'"$DJS"'${color ffffff}'" "/}${font}


${font CrimeFighter BB:size=11}${color Tan1}WEATHER${color}:${font}

Weather:${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EKKA cloud_cover}
Temperature:${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EKKA temperature}°C
Humidity:${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EKKA humidity}%
Wind speed:${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EKKA wind_speed}km/h
Wind direction:${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EKKA wind_dir} 
Pressure:${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EKKA pressure}mbar
Update:${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EKKA last_update} UTC


${font CrimeFighter BB:size=11}${color Tan1}SHORTCUTS${color}:${font}

Super+t$alignr Terminal
Super+h$alignr Thunar
Super+e$alignr Scite
Super+p$alignr Pyroom
Super+m$alignr Vlc
Super+w$alignr Iceweasel
Super+c$alignr Claws
Super+f$alignr Gftp
Super+g$alignr Gimp
Super+q$alignr Gqview
Super+o$alignr Orage
Ctrl+Alt+d$alignr Show/Hide
"You bow to NOone..."

Re: Conky Help

@ steen

here are the settings for my conky rc

max_specials 1000
max_user_text 150000
background yes
use_xft yes
xftfont mono:size=12
xftalpha 1
update_interval 1
total_run_times 0
own_window yes
own_window_transparent yes
own_window_type desktop
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 400 400
maximum_width 400
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color white
default_shade_color black
default_outline_color white
alignment top_left
gap_x 20
gap_y 20
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
own_window_colour white

i just copied your line into my config and got the whole month

i wondered whether you had something covering up the last line of the calendar, such as a voffset somewhere... but it doesn't appear that you do

@Sector11
that's a useful setting to know about, but my everyday conky doesn't specify buffer size either and the calendar works just fine... the default should be big enough to cover the characters involved in the calender i would think.

Last edited by mrpeachy (2010-08-04 20:45:50)

It's hard to find something if you don't know what you're looking for.
I have a blog, it's mostly about conky and lua stuff... go here.

Re: Conky Help

steen wrote:
Sector11 wrote:

So use at least 1024:

text_buffer_size 1024
TEXT

Well now I've tried text_buffer_size 4096 and all the way to 10000, but I still just get the same sad

Then I am at a total loss.  I tried your conky (complete) here (the top one) and it does the same for me so I stripped out everything except the calendar - same result.  I reduced the text buffer size to 256 and again it's the same, so I added two options.

These came from friends, I could never figure out those codes, because I wanted the day names a different colour than the main calendar AND have today highlighted.

Option 2 is the same but TU - WE - TH are replaced with Month and Year  smile

http://omploader.org/tNTVjZw

But I'm honestly at a loss as to why yours isn't working.  I hope these help.

TEXT
${color ffffff}${font Bitstream Vera Sans Mono:size=7}

${alignc}${color3}${font Bitstream Vera Sans Mono:size=7}${execi 60 date +"%B %Y"}

${execpi 60 DJS=`date +%_d`; cal | sed '1d' | sed '/./!d' | sed 's/$/ /' | fold -w 21 | sed -n '/^.\{21\}/p' | sed 's/^/${alignc} /' | sed /" $DJS "/s/" $DJS "/" "'${color FF853F}'"$DJS"'${color ffffff}'" "/}

${alignc}Option 1

${alignc}Su Mo Tu We Th Fr Sa
${color 777777}${execpi 60 DJS=`date +%_d`; cal | sed '2d' | sed '1d'  | sed '/./!d' | sed 's/$/                     /' | fold -w 21 | sed -n '/^.\{21\}/p' | sed 's/^/${alignc} /' | sed /" $DJS "/s/" $DJS "/" "'${color2}'"$DJS"'${color 777777}'" "/}

${alignc}Option 2

${alignc}${color 777777}Su Mo  ${color}${time %b %y}${color 777777}  Fr Sa
${color 777777}${execpi 60 DJS=`date +%_d`; cal | sed '2d' | sed '1d'  | sed '/./!d' | sed 's/$/                     /' | fold -w 21 | sed -n '/^.\{21\}/p' | sed 's/^/${alignc} /' | sed /" $DJS "/s/" $DJS "/" "'${color2}'"$DJS"'${color 777777}'" "/}

C L I C K ! ! !: 21 spaces!!

| sed 's/$/                     /' | fold -w 21

| sed 's/$/ /' | fold -w 21 |

Yours (spaces added) and the two options ---> http://omploader.org/tNTVjcA

Last edited by Sector11 (2010-08-04 20:55:58)

Re: Conky Help

that is weird that it doesn't work for either of you but does for me

It's hard to find something if you don't know what you're looking for.
I have a blog, it's mostly about conky and lua stuff... go here.

Re: Conky Help

mrpeachy wrote:

that is weird that it doesn't work for either of you but does for me

We are special - or cursed - special - I said special first!!!!!

Yea, it is weird isn't it!

You running Statler A2 OpenBox? I am.

  18:06 ~
         $ conky -v
Conky 1.8.0~git925e80ac compiled Sun Mar 28 09:54:47 UTC 2010 for Linux 2.6.32-3-amd64 (x86_64)

Compiled in features:

System config file: /etc/conky/conky.conf
Package library path: /usr/lib/conky

 X11:
  * Xdamage extension
  * XDBE (double buffer extension)
  * Xft
  * ARGB visual

 Music detection:
  * MPD
  * MOC

 General:
  * math
  * hddtemp
  * portmon
  * Curl
  * RSS
  * Weather (METAR)
  * Weather (XOAP)
  * wireless
  * support for IBM/Lenovo notebooks
  * nvidia
  * eve-online
  * config-output
  * Imlib2
  * ALSA mixer support
  * apcupsd
  * iostats
  * ncurses
  * Lua

  Lua bindings:
   * Cairo
   * Imlib2

  18:07 ~
         $ 

Re: Conky Help

nope, im still using good ol' 9.04.01 smile ... maybe the sed program is different between the 2 versions *shrug*
(i'll probably switch once corenominal deems Statler a final release)

Last edited by mrpeachy (2010-08-04 21:16:36)

It's hard to find something if you don't know what you're looking for.
I have a blog, it's mostly about conky and lua stuff... go here.

Re: Conky Help

@ mrpeachy
{Twilight Zone music in background}

OK where is he?  Rod Sterling come out where ever you are!

I just took your conky settings and replaced what I was using with your code - deleting 20 spaces, so the calendar line was like the original line:

http://omploader.org/tNTVjeQ

Rod Sterling come out where ever you are!

Last edited by Sector11 (2010-08-04 21:28:59)

Re: Conky Help

mrpeachy wrote:

nope, im still using good ol' 9.04.01 smile ... maybe the sed program is different between the 2 versions *shrug*
(i'll probably switch once corenominal deems Statler a final release)

has to be it...

  18:18 ~
         $ sed --version
GNU sed version 4.2.1
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,
to the extent permitted by law.

GNU sed home page: <http://www.gnu.org/software/sed/>.
General help using GNU software: <http://www.gnu.org/gethelp/>.
E-mail bug reports to: <bug-gnu-utils@gnu.org>.
Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.

  18:19 ~
         $ 

EDIT:  Do the switch, mrpeachy, use the forc .... er ... do the switch!
It's really good stuff!  big_smile

Last edited by Sector11 (2010-08-04 21:23:49)

Re: Conky Help

ignore this smile
although relatedly  (and i know this is off topic) but why does:

$echo 1          2

gives

1 2

how do you preserve spaces in this situation?

Last edited by mrpeachy (2010-08-04 21:29:37)

It's hard to find something if you don't know what you're looking for.
I have a blog, it's mostly about conky and lua stuff... go here.

Re: Conky Help

mrpeachy wrote:

ignore this smile

NO!  I get:

  18:27 ~
         $ mcdowall@mcdowall-desktop:~$ echo test  
bash: mcdowall@mcdowall-desktop:~$: command not found

  18:27 ~
         $ echo test                      test |sed  's/$/ /'
test test 

  18:27 ~
         $ 

lol lol lol

Re: Conky Help

(see my edited post ) but you get the same even without the sed part, so it wasn't a real test of sed smile
plus i have temporarily forgotten the meaning of the "$" symbol with sed!

ok, so sed 's/$/ /' adds a space to the end of a line... but now i'm even more confused

so

$echo test | sed 's/$/!/'

gives

test!

and
so

$echo test | sed 's/$/!!!!!/'

gives

test!!!!!

so apply that principal to spaces in the calendar line in conky and it makes no sense

Last edited by mrpeachy (2010-08-04 21:46:22)

It's hard to find something if you don't know what you're looking for.
I have a blog, it's mostly about conky and lua stuff... go here.

747

Re: Conky Help

Sector11 wrote:

C L I C K ! ! !: 21 spaces!!

WTF!??? It works!! HurrRaaaaayyyy!!!!

That is weird.....

But plenty many much thanx for your time and work. Both of you smile

"You bow to NOone..."

Re: Conky Help

mrpeachy wrote:

ignore this smile
although relatedly  (and i know this is off topic) but why does:

$echo 1          2

gives

1 2

how do you preserve spaces in this situation?

No... it was a problem in conky so not off topic (my opinion)
I looked at the man page for echo and tried a few things and nothing worked - so it is even more puzzling.

  16:20 ~
         $ echo 1\t\t2
1tt2

  16:21 ~
         $ echo 1 \t \t 2
1 t t 2

  16:21 ~
         $ echo -e 1 \t\t 2
1 tt 2

  16:22 ~
         $ echo -e 1 \t \t 2
1 t t 2

  16:22 ~
         $ echo -e 1\t \t2
1t t2

  16:23 ~
         $ echo -e \t 1 \t2
t 1 t2

  16:24 ~
         $ echo -e \t1 \t2
t1 t2

  16:25 ~
         $ echo -e \t1 \f2
t1 f2

  16:25 ~
         $ echo -e \t1 \f2\n
t1 f2n

  16:25 ~
         $ echo -e \t1 \n2
t1 n2

  16:25 ~
         $ 

Re: Conky Help

steen wrote:
Sector11 wrote:

C L I C K ! ! !: 21 spaces!!

WTF!??? It works!! HurrRaaaaayyyy!!!!

That is weird.....

But plenty many much thanx for your time and work. Both of you smile


You're welcome!  Now we have to find out - Why!  big_smile

Re: Conky Help

@ nikondecade

Good read: 5.4. File Names

I think you will have a problem with the '/media/FreeAgent Drive' name with that space.

In the code below you will find: '/media/5' change it for '/media/FreeAgent Drive' and see if it works.

Can you post a screenshot of it running please.  So I can see the differences between the "edited" conky here and how you see it and want it.

I have found a few errors above TEXT and made some changes below text as well.  One very noticeable change below TEXT was the use of ${font} to turn off a font called after TEXT and start using the default font.  You never actually called for a font until the last line.

http://omploader.org/tNTc2MQ

In the image the "top" conky is text only to help with spacing so things don't move around.  I'm guessing that your screen width is 1024 because of:

minimum_size 1024 0
maximum_width 1024 0

The second conky is modified to stop things from moving around when things like "0B" become 219MiB etc. etc.

And the last conky is yours, almost, missing the ${font} commands that are not needed and a few ${color} commands.  However, I have no idea if you want it on top on the bottom right or left you had:

#alignment bottom_left

commented out ... I have it "tr" - top_right - tr being a legal call and easer to type.

#avoid flicker
double_buffer yes
#own window to run simultanious 2 or more conkys
own_window  yes
own_window_transparent no
own_window_type desktop
own_window_hints undecorate,sticky,skip_taskbar,skip_pager 
#borders
draw_borders no
#border_margin 1  <<<--- not a valid command
#shades
draw_shades no
#position
gap_x 0 #530   <<<--- change as needed
gap_y 0 #-120   <<<--- change as needed
alignment tl #bottom_left   <<<--- change as needed
#behaviour
update_interval 1.0
#colour
default_color  8f8f8f
#default_shade_color 000000
#own_window_colour 
#font
use_xft yes
xftfont DejaVu Serif Book:size=9
#to prevent window from moving
use_spacer none
minimum_size 1024 0
maximum_width 1024 0
# stuff after 'TEXT' will be formatted on screen
#$alignc center text
TEXT
 Mem: 9999MiB${goto 150}|     Up: 9999Kb/s${goto 290}9999GiB${goto 350}|  Home: 99.99GiB
 Uptime: 9d 23h 59m${goto 150}| Down: 999Kb/s${goto 290}9999GiB${goto 350}|  Multimedia: 999GiB
                                           ${font Sans:size=16}${time %a  %b  %d}${alignr 25}${time %k:%M}${font}

${color} Mem: ${color e0e0e0}${mem}${goto 150}${color}|     Up: ${color e0e0e0}${upspeed eth0}Kb/s${goto 290}${color}${totalup eth 0}${goto 350}|  ${color}Home: ${color e0e0e0}${fs_free /}
${color} Uptime: ${color e0e0e0}${uptime_short}${goto 150}${color}| Down: ${color e0e0e0}${downspeed eth0}Kb/s${goto 290}${color}${totaldown eth0}${goto 350}|  Multimedia: ${color e0e0e0}${fs_free /media/5}${color}
                                           ${font Sans:size=16}${time %a  %b  %d}${alignr 25}${time %k:%M}${font}

${color} Mem: ${color e0e0e0}${mem} ${color}  | Up:${color e0e0e0}${upspeed eth0}Kb/s ${color} ${totalup eth 0}         |  ${color}Home: ${color e0e0e0}${fs_free /}
${color} Uptime: ${color e0e0e0}${uptime_short}${color}| Down:${color e0e0e0}${downspeed eth0}Kb/s${color}  ${totaldown eth0}                   |  Multimedia: ${color e0e0e0}${fs_free /media/5}${color}
                                           ${font Sans:size=16}${time %a  %b  %d}${alignr 25}${time %k:%M}${font}

Last edited by Sector11 (2010-08-09 23:28:13)