[Solved] Conky stock ticker script?

Does anyone have a stock ticker script for Conky?
Orjanp
Last edited by orjanp (2009-01-29 22:07:24)

Why not add an rss feed into conky, here's a link for that. http://howto.wikia.com/wiki/Howto_add_a … nky-rss.sh
I'm sure there are plenty of stock feeds in rss format around.

Similar Messages

  • Stock Ticker

    Hello,
    I would like to create a stock ticker that goes on a website for the company I work for. I would like to develop this in Flash (I have Flash CS3). Is this possible to do in Action script 2 or 3? I already use flash to create banner adds but if i could use some of the space to show my companies current stock price that would be awesome!
    I've tried looking on the web for free stock tickers but I've had no luck.
    Thanks for your help
    Chris

    Great point. I will do some more research to find out how our old stock ticker is working on our
    old site. I'll add another post when I have some more information.
    Thanks for the quick response!

  • Adding a stock ticker to an iWeb site?

    Does iWeb not support Yahoo! Badges? http://finance.yahoo.com/badges
    They use something called iFrame. Is that different than HTML?
    Anyone know how I can add a stock ticker to my iWeb page?
    http://web.mac.com/michaelgrothaus/

    I tested and it worked fine for me....
    I went through Yahoo steps and had code generated...
    Went to iWeb and on page I wanted to add chart, I clicked on the "Web Widgets" icon at bottom of iWeb page and picked "HTML Snippet" and then pasted code in area provided (where it says paste code), finally I hit "Apply" saved my pages and published. Worked fine.
    Hope this helps you.

  • My first PKGBUILD - stock ticker style output on the console

    I created my first PKGBUILD of a simple program I wrote called "ticker" which just converts input text to scrolling stock ticker style output on the console.
    The PKGBUILD and a screenshot are at http://www.fial.com/~scott/ticker 
    I'd like to submit it to the AUR, but I'd really appreciate any comments/advice first.
    Scott
    Last edited by scottfial (2010-07-04 00:38:38)

    Writing what it's about in your post (title) would help building interest, I suppose.

  • Stock Ticker in iWeb '08

    Hello,
    I would like to put in a nice looking stock ticker for an Indian company in my iWeb website using the HTML Web Widget feature in iWeb. I have found a really nice one on Yahoo but that is only for Dashboard. I have two questions:
    1. Where can I find a neat, clean (vertical) stock ticker with HTML code I can paste into iWeb?
    2. If possible, how can I find the HTML code of Dashboard widgets?
    Thanks!

    Hi there,
    have a look at the following page:
    http://www.widgetbox.com/search?q=stock
    This one looks really good
    http://www.widgetbox.com/widget/yahoo-finance
    Enter symbols, get widget, get widget code and copy&paste it to an html snippet
    Regards and happy 2008,
    Cédric

  • WLCS 2.0  and Stock Ticker Display

    hello there,
    Being a commerce server , is there any component in WLCS that eases the display of a live Stock Ticker.(The data is scrapped from a live database)??
    regards
    dubey

    YES! This is exactly what just happened to me. Driving me insane. Have you found a solution?

  • Read a stock ticker symbol using java

    HI Guys,
    I am complete beginner to java. I have done c programming before for a long time. But its been 4 years haven't used c.
    i am trying to read a stock ticker symbol periodically and save it to my data base. I would like to use java for that. any suggestions on how to do that. IS Java the best tool for reading webpages, especially if tehre are tables in the web pages? For example options page of any stock has a table. Is it easier to to use Java to read the table?
    Thanks a bunch
    Lex

    Hi,
    To execute this task would be quite difficult since you are not in an "ABAP" environment.
    The best approach is to create an RFC, that reads this Y table; and import the RFC to PI.
    From there you can decide:
    1 - Use RFC Receiver Adapter: if you want to call the RFC and get the data yourself.
    2 - Use RFC Sender Adapter: if you want the data to come out of the RFC and go to PI by itself.
    Ricardo Sancio Lóra
    Brazil

  • [SOLVED] Conky Mail Notification using a Bash Script

    Hi there, I have conky piped into a dzen panel, and I'm trying to get conky to echo my unread mail count whenever the # is >0. It's just not working for me, and I was wondering what I did incorrectly.
    I have the 3 following files.
    ~/.conkyrc
    background yes
    out_to_console yes
    out_to_x no
    update_interval 1
    TEXT
    ${execi 60 /home/nil/mail-notify}
    ~/mail-notify
    #! /bin/bash
    gmail=$(python /home/nil/gmail.py)
    if [ $gmail -gt 0 ]; then
    echo "$gmail"
    fi
    ~/gmail.py
    #!/usr/bin/env python
    # This is a script that checkes the gmail unread count.
    from urllib.request import FancyURLopener
    username = 'myusername'
    password = 'mypasswd'
    url = 'https://%s:%[email protected]/mail/feed/atom' % (username, password)
    opener = FancyURLopener()
    page = opener.open(url)
    contents = page.read().decode('utf-8')
    ifrom = contents.index('<fullcount>') + 11
    ito = contents.index('</fullcount>')
    unread = contents[ifrom:ito]
    print(unread)
    gmail.py was taken from the archwiki page, and I've confirmed it to be working (I censored my user name and password here). What gmail.py does is output an integer representing your unread mail count.
    Similarly, Conky's code and the mail-notify script run fine. If I rewrite mail-notify's conditional to be "if [ 1 -gt 0 ]; then", then it will successfully output the unread mail count. Hence the problem lies in the scripting of the if condition. mail-notify should run gmail.py, if the output count is >0, then it should echo that number. Else it does nothing. Any help is appreciated!
    Last edited by nil (2013-08-19 23:40:14)

    jasonwryan wrote:Presumably the script is called gmail.py, not gmail1.py?
    Oops, sorry, that was a typo when writing up this post.

  • [SOLVED]Conky Gmail Script Incorrect

    The python gmail script on the arch wik no longer works on python3 or python2 for me. This error is shown in wing:
    builtins.ValueError: invalid literal for int() with base 10:
    I'm not sure how to fix the incorrect int value, but I would love to see it fixed and posted to the arch wiki again.
    #Enter your username and password below within double quotes
    # eg. username="username" and password="password"
    username="****"
    password="****"
    com="wget -q -O - https://"+username+":"+password+"@mail.google.com/mail/feed/atom --no-check-certificate"
    temp=os.popen(com)
    msg=temp.read()
    index=msg.find("<fullcount>")
    index2=msg.find("</fullcount>")
    fc=int(msg[index+11:index2])
    if fc==0:
    print("0 new")
    else:
    print(str((fc)+" new"))
    Thanks
    Last edited by duke11235 (2011-11-21 04:55:28)

    Your problem may be with wget.  Try curl:
    com = 'curl -s -u "{}:{}" https://mail.google.com/mail/feed/atom'.format( username, password )
    The url you are using is for the Gmail RSS feed, and it contains a ':'.  The python urllib.request module that lunar used expects that a port number will follow the ':'. That is why lunar's script is failing for you.
    The script I use does not use the RSS feed.  It uses the python IMAP library and connects to imap.gmail.com at port 993.
    #!/usr/bin/env python
    # -*- coding: UTF-8 -*-
    import sys, imaplib
    port = 993
    server = 'imap.gmail.com'
    username = '...'
    passwd = '...'
    imap_server = imaplib.IMAP4_SSL(server, port)
    try:
    imap_server.login(username, passwd)
    except:
    print('?? new')
    sys.exit( 1 )
    typ, data = imap_server.select ('Inbox', True)
    if typ == 'OK':
    total = int(data[0])
    typ, data = imap_server.search (None, 'SEEN')
    if typ == 'OK':
    seen = len(data[0].split())
    print('{}/{} new'.format(total, total - seen))
    if typ != 'OK':
    print('?? new')
    imap_server.logout()

  • [SOLVED]Conky Forecast problems

    I upgraded OpenOffice yesterday and for some reason everytime I run Conky, this error message shows up
    /usr/bin/conkyForecast: line 3: :/usr/lib/openoffice/basis-link/program/:/usr/lib/guake: No such file or directory
    If anyone knows how to solve that problem, any help would be appreciated.
    Last edited by uzi304 (2010-04-07 23:50:44)

    Oh right, I'm sorry.
    # Possible variables to be used:
    # Variable Arguments Description
    # acpiacadapter ACPI ac adapter state.
    # acpifan ACPI fan state
    # acpitemp ACPI temperature.
    # adt746xcpu CPU temperature from therm_adt746x
    # adt746xfan Fan speed from therm_adt746x
    # battery (num) Remaining capasity in ACPI or APM
    # battery. ACPI battery number can be
    # given as argument (default is BAT0).
    # buffers Amount of memory buffered
    # cached Amount of memory cached
    # color (color) Change drawing color to color
    # cpu CPU usage in percents
    # cpubar (height) Bar that shows CPU usage, height is
    # bar's height in pixels
    # downspeed net Download speed in kilobytes
    # downspeedf net Download speed in kilobytes with one
    # decimal
    # exec shell command Executes a shell command and displays
    # the output in torsmo. warning: this
    # takes a lot more resources than other
    # variables. I'd recommend coding wanted
    # behaviour in C and posting a patch :-).
    # execi interval, shell Same as exec but with specific interval.
    # command Interval can't be less than
    # update_interval in configuration.
    # fs_bar (height), (fs) Bar that shows how much space is used on
    # a file system. height is the height in
    # pixels. fs is any file on that file
    # system.
    # fs_free (fs) Free space on a file system available
    # for users.
    # fs_free_perc (fs) Free percentage of space on a file
    # system available for users.
    # fs_size (fs) File system size
    # fs_used (fs) File system used space
    # hr (height) Horizontal line, height is the height in
    # pixels
    # i2c (dev), type, n I2C sensor from sysfs (Linux 2.6). dev
    # may be omitted if you have only one I2C
    # device. type is either in (or vol)
    # meaning voltage, fan meaning fan or temp
    # meaning temperature. n is number of the
    # sensor. See /sys/bus/i2c/devices/ on
    # your local computer.
    # kernel Kernel version
    # loadavg (1), (2), (3) System load average, 1 is for past 1
    # minute, 2 for past 5 minutes and 3 for
    # past 15 minutes.
    # machine Machine, i686 for example
    # mails Mail count in mail spool. You can use
    # program like fetchmail to get mails from
    # some server using your favourite
    # protocol. See also new_mails.
    # mem Amount of memory in use
    # membar (height) Bar that shows amount of memory in use
    # memmax Total amount of memory
    # memperc Percentage of memory in use
    # new_mails Unread mail count in mail spool.
    # nodename Hostname
    # outlinecolor (color) Change outline color
    # pre_exec shell command Executes a shell command one time before
    # torsmo displays anything and puts output
    # as text.
    # processes Total processes (sleeping and running)
    # running_processes Running processes (not sleeping),
    # requires Linux 2.6
    # shadecolor (color) Change shading color
    # stippled_hr (space), Stippled (dashed) horizontal line
    # (height)
    # swapbar (height) Bar that shows amount of swap in use
    # swap Amount of swap in use
    # swapmax Total amount of swap
    # swapperc Percentage of swap in use
    # sysname System name, Linux for example
    # time (format) Local time, see man strftime to get more
    # information about format
    # totaldown net Total download, overflows at 4 GB on
    # Linux with 32-bit arch and there doesn't
    # seem to be a way to know how many times
    # it has already done that before torsmo
    # has started.
    # totalup net Total upload, this one too, may overflow
    # updates Number of updates (for debugging)
    # upspeed net Upload speed in kilobytes
    # upspeedf net Upload speed in kilobytes with one
    # decimal
    # uptime Uptime
    # uptime_short Uptime in a shorter format
    # seti_prog Seti@home current progress
    # seti_progbar (height) Seti@home current progress bar
    # seti_credit Seti@hoome total user credit
    # Use Xft?
    use_xft yes
    xftfont DejaVu Sans:size=8
    xftalpha 0.8
    text_buffer_size 2048
    # Update interval in seconds
    update_interval 1
    # This is the number of times Conky will update before quitting.
    # Set to zero to run forever.
    total_run_times 0
    # Create own window instead of using desktop (required in nautilus)
    own_window yes
    own_window_transparent yes
    own_window_type override
    #own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    # Use double buffering (reduces flicker, may not work for everyone)
    double_buffer yes
    # Minimum size of text area
    minimum_size 180 0
    #maximum_width 200
    # Draw shades?
    draw_shades no
    # Draw outlines?
    draw_outline no
    # Draw borders around text
    draw_borders no
    # Stippled borders?
    stippled_borders 0
    # border margins
    border_margin 5
    # border width
    border_width 1
    # Default colors and also border colors
    default_color white
    #default_shade_color black
    #default_outline_color white
    own_window_colour white
    # Text alignment, other possible values are commented
    #alignment top_left
    alignment top_right
    #alignment bottom_left
    #alignment bottom_right
    # Gap between borders of screen and text
    # same thing as passing -x at command line
    gap_x 35
    gap_y 50
    # Subtract file system buffers from used memory?
    no_buffers yes
    # set to yes if you want all text to be in uppercase
    uppercase no
    # number of cpu samples to average
    # set to 1 to disable averaging
    cpu_avg_samples 2
    # number of net samples to average
    # set to 1 to disable averaging
    net_avg_samples 2
    # Force UTF8? note that UTF8 support required XFT
    override_utf8_locale yes
    # Add spaces to keep things from moving about? This only affects certain objects.
    use_spacer none
    TEXT
    SYSTEM ${hr 2}
    ${voffset 2}${font OpenLogos:size=16}B${font} Machine:${alignr}${kernel}
    ${font StyleBats:size=16}A${font} CPU1: ${cpu cpu1}% ${alignr}${cpubar cpu1 8,60}
    ${font StyleBats:size=16}A${font} CPU2: ${cpu cpu2}% ${alignr}${cpubar cpu2 8,60}
    ${font StyleBats:size=16}g${font} RAM: $memperc% ${alignr}${membar 8,60}
    ${font StyleBats:size=16}j${font} SWAP: $swapperc% ${alignr}${swapbar 8,60}
    ${font Webdings:size=16}~${font} Battery: ${battery_percent BAT1}% ${alignr}${battery_bar 8,60 BAT1}
    ${font StyleBats:size=16}q${font} Uptime: ${alignr}${uptime}
    DATE ${hr 2}
    ${alignc 35}${font Arial Black:size=26}${time %H:%M}${font}
    ${alignc}${time %A %d %Y}
    HD ${hr 2}
    ${voffset 4}${font Pie charts for maps:size=14}7${font} ${voffset -5}Root:
    ${voffset 4}${fs_used /}/${fs_size /} ${alignr}${fs_bar 8,60 /}
    ${font Pie charts for maps:size=14}7${font} ${voffset -5}Home:
    ${voffset 4}${fs_free /home}/${fs_size /home} ${alignr}${fs_bar 8,60 /home}
    NETWORK ${hr 2}
    ${if_existing /proc/net/route wlan0}
    ${voffset -6}${font PizzaDude Bullets:size=14}O${font} Up: ${upspeed wlan0} ${alignr}${upspeedgraph wlan0 8,60 3465A4 729FCF}
    ${voffset 4}${font PizzaDude Bullets:size=14}U${font} Down: ${downspeed wlan0} ${alignr}${downspeedgraph wlan0 8,60 3465A4 729FCF}
    ${voffset 4}${font PizzaDude Bullets:size=14}N${font} Upload: ${alignr}${totalup wlan0}
    ${voffset 4}${font PizzaDude Bullets:size=14}T${font} Download: ${alignr}${totaldown wlan0}
    ${voffset 4}${font PizzaDude Bullets:size=14}Z${font} Signal: ${wireless_link_qual wlan0}% ${alignr}${wireless_link_bar 8,60 wlan0}
    ${voffset 4}${font PizzaDude Bullets:size=14}a${font} Local Ip: ${alignr}${addr wlan0}
    ${voffset 4}${font PizzaDude Bullets:size=14}b${font} Public Ip: ${alignr}${execi 1 ~/.scripts/ip.sh}
    ${else}${if_existing /proc/net/route eth0}
    ${voffset -6}${font PizzaDude Bullets:size=14}O${font} Up: ${upspeed eth0} kb/s ${alignr}${upspeedgraph eth0 8,60 C22F2F DA3F3F}
    ${voffset 4}${font PizzaDude Bullets:size=14}U${font} Down: ${downspeed eth0} kb/s ${alignr}${downspeedgraph eth0 8,60 C22F2F DA3F3F}
    ${voffset 4}${font PizzaDude Bullets:size=14}N${font} Upload: ${alignr}${totalup eth0}
    ${voffset 4}${font PizzaDude Bullets:size=14}T${font} Download: ${alignr}${totaldown eth0}
    ${voffset 4}${font PizzaDude Bullets:size=14}a${font} Local Ip: ${alignr}${addr eth0}
    ${voffset 4}${font PizzaDude Bullets:size=14}b${font} Public Ip: ${alignr}${execi 1 ~/.scripts/ip.sh}
    ${endif}${else}${if_existing /proc/net/route eth1}
    ${voffset -6}${font PizzaDude Bullets:size=14}O${font} Up: ${upspeed eth1} kb/s ${alignr}${upspeedgraph eth1 8,60 C22F2F DA3F3F}
    ${voffset 4}${font PizzaDude Bullets:size=14}U${font} Down: ${downspeed eth1} kb/s ${alignr}${downspeedgraph eth1 8,60 C22F2F DA3F3F}
    ${voffset 4}${font PizzaDude Bullets:size=14}N${font} Upload: ${alignr}${totalup eth1}
    ${voffset 4}${font PizzaDude Bullets:size=14}T${font} Download: ${alignr}${totaldown eth1}
    ${voffset 4}${font PizzaDude Bullets:size=14}a${font} Local Ip: ${alignr}${addr eth1}
    ${voffset 4}${font PizzaDude Bullets:size=14}b${font} Public Ip: ${alignr}${execi 1 ~/.scripts/ip.sh}
    ${endif}${else}
    ${font PizzaDude Bullets:size=14}4${font} Network Unavailable
    ${endif}
    WEATHER ${hr 2}
    ${if_existing /proc/net/route wlan0}
    ${voffset -10}${alignr 56}${font ConkyWeather:style=Bold:size=40}${execi 600 conkyForecast --location=USNJ0392 --datatype=WF}${font}
    ${voffset -50}${font Weather:size=40}y${font} ${voffset -38}${font Arial Black:size=26}${execi 600 conkyForecast --location=USNJ0392 --datatype=HT --imperial}${font}
    ${voffset 0}${alignc 43}${execpi 600 conkyForecast --location=USNJ0392 --datatype=DW --startday=1 --shortweekday} ${alignc 8}${execpi 600 conkyForecast --location=USNJ0392 --datatype=DW --startday=2 --shortweekday} ${alignc -29}${execpi 600 conkyForecast --location=USNJ0392 --datatype=DW --startday=3 --shortweekday} ${alignc -64}${execpi 600 conkyForecast --location=USNJ0392 --datatype=DW --startday=4 --shortweekday}
    ${voffset 0}${alignc 75}${font ConkyWeather:size=28}${execpi 600 conkyForecast --location=USNJ0392 --datatype=WF --startday=1 --endday=4 --spaces=1}${font}
    ${voffset 0}${font DejaVu Sans:size=7}${alignc 48}${execpi 600 conkyForecast --location=USNJ0392 --datatype=HT --imperial --startday=1 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=USNJ0392 --datatype=LT --startday=1 --hideunits --centeredwidth=3} ${alignc -14}${execpi 600 conkyForecast --location=USNJ0392 --datatype=HT --imperial --startday=2 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=USNJ0392 --datatype=LT --startday=2 --hideunits --centeredwidth=3} ${alignc -40}${execpi 600 conkyForecast --location=USNJ0392 --datatype=HT --imperial --startday=3 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=USNJ0392 --datatype=LT --startday=3 --hideunits --centeredwidth=3} ${alignr 6}${execpi 600 conkyForecast --location=USNJ0392 --datatype=HT --imperial --startday=4 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=USNJ0392 --datatype=LT --startday=4 --hideunits --centeredwidth=3}${font}
    ${else}${if_existing /proc/net/route eth0}
    ${voffset -10}${alignr 56}${font ConkyWeather:style=Bold:size=40}${execi 600 conkyForecast --location=??? --datatype=WF}${font}
    ${voffset -50}${font Weather:size=40}y${font} ${voffset -38}${font Arial Black:size=26}${execi 600 conkyForecast --location=??? --datatype=HT}${font}
    ${voffset 0}${alignc 43}${execpi 600 conkyForecast --location=??? --datatype=DW --startday=1 --shortweekday} ${alignc 8}${execpi 600 conkyForecast --location=??? --datatype=DW --startday=2 --shortweekday} ${alignc -29}${execpi 600 conkyForecast --location=??? --datatype=DW --startday=3 --shortweekday} ${alignc -64}${execpi 600 conkyForecast --location=??? --datatype=DW --startday=4 --shortweekday}
    ${voffset 0}${alignc 75}${font ConkyWeather:size=28}${execpi 600 conkyForecast --location=??? --datatype=WF --startday=1 --endday=4 --spaces=1}${font}
    ${voffset 0}${font DejaVu Sans:size=7}${alignc 48}${execpi 600 conkyForecast --location=??? --datatype=HT --startday=1 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=??? --datatype=LT --startday=1 --hideunits --centeredwidth=3} ${alignc -14}${execpi 600 conkyForecast --location=??? --datatype=HT --startday=2 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=??? --datatype=LT --startday=2 --hideunits --centeredwidth=3} ${alignc -40}${execpi 600 conkyForecast --location=??? --datatype=HT --startday=3 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=??? --datatype=LT --startday=3 --hideunits --centeredwidth=3} ${alignr 6}${execpi 600 conkyForecast --location=??? --datatype=HT --startday=4 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=??? --datatype=LT --startday=4 --hideunits --centeredwidth=3}${font}
    ${endif}${else}${if_existing /proc/net/route eth1}
    ${voffset -10}${alignr 56}${font ConkyWeather:style=Bold:size=40}${execi 600 conkyForecast --location=??? --datatype=WF}${font}
    ${voffset -50}${font Weather:size=40}y${font} ${voffset -38}${font Arial Black:size=26}${execi 600 conkyForecast --location=??? --datatype=HT}${font}
    ${voffset 0}${alignc 43}${execpi 600 conkyForecast --location=??? --datatype=DW --startday=1 --shortweekday} ${alignc 8}${execpi 600 conkyForecast --location=??? --datatype=DW --startday=2 --shortweekday} ${alignc -29}${execpi 600 conkyForecast --location=??? --datatype=DW --startday=3 --shortweekday} ${alignc -64}${execpi 600 conkyForecast --location=??? --datatype=DW --startday=4 --shortweekday}
    ${voffset 0}${alignc 75}${font ConkyWeather:size=28}${execpi 600 conkyForecast --location=??? --datatype=WF --startday=1 --endday=4 --spaces=1}${font}
    ${voffset 0}${font DejaVu Sans:size=7}${alignc 48}${execpi 600 conkyForecast --location=??? --datatype=HT --startday=1 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=??? --datatype=LT --startday=1 --hideunits --centeredwidth=3} ${alignc -14}${execpi 600 conkyForecast --location=??? --datatype=HT --startday=2 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=??? --datatype=LT --startday=2 --hideunits --centeredwidth=3} ${alignc -40}${execpi 600 conkyForecast --location=??? --datatype=HT --startday=3 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=??? --datatype=LT --startday=3 --hideunits --centeredwidth=3} ${alignr 6}${execpi 600 conkyForecast --location=??? --datatype=HT --startday=4 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=??? --datatype=LT --startday=4 --hideunits --centeredwidth=3}${font}
    ${endif}${else}
    ${font PizzaDude Bullets:size=14}4${font} Weather Unavailable
    ${endif}

  • (SOLVED) Conky and battery status

    How come this will not work on my system:
    ${color red}$alignc Battery Information
    ${color lightgrey} Currently: $battery
    ${color lightgrey}$stippled_hr
    I have tried a dozen scripts for battery status and nothing works. Does anyone have a sure fire way to get some status from my battery?
    I am using a netbook, pretty standard stuff. I don't know why it won't work. I tried other commands and one returned "U" for unknown battery status and what not. How can I find out what is going on?
    edit:
    Battery: ${battery_percent BAT0}% ${alignr}${battery_bar 8,70 BAT0}
    This displays 0% and an empty bar.
    I went ahead into /proc/acpi/battery and found BAT1 and no BAT0, so I changed the script and I get a percent now...
    This may be solved, but I am going to try the other functions to see if I can get the output I wanted in the first place.
    Why does Conky hate batteries?
    Last edited by Google (2010-07-02 07:16:26)

    "$battery" does not work because it assumes as default BAT0, which you don't have so it will have to be "$battery BAT1". See "man conky" for more info....

  • [Solved]Conky and word wrapping - Is there a way?

    So I have a very limited area to work with, something like 176x360 (+/- a few pixels), and I want the ability to show an RSS feed. Well, the feed works of course, but due to the limited width, I'm in great need of word wrapping, and for that problem I have found no solution and going on for 2-3 hours straight, my head hurts
    Anyway, here's my .conkyrc, not that it's needed of course.
    # ~/.conkyrc
    double_buffer yes
    use_xft yes
    xftfont Bitstream Vera Sans Mono:size=8
    xftalpha 0.8
    update_interval 1.0
    total_run_times 0
    own_window yes
    own_window_type override
    own_window_transparent yes
    own_window_colour hotpink
    own_window_hints undecorated,below,skip_taskbar,sticky,skip_pager
    minimum_size 176 360
    maximum_size 176 360
    maximum_width 176
    draw_shades no
    draw_outline no
    draw_borders no
    stippled_borders 0
    border_margin 0
    border_width 0
    default_color green
    default_shade_color green
    default_outline_color green
    alignment bottom_right
    gap_x 16
    gap_y 16
    no_buffers yes
    uppercase no
    TEXT
    $alignc${nodename}
    $alignc${sysname} ${kernel}
    $hr
    CPU:$alignr$cpu% ${cpubar 10,106}
    RAM:$alignr$memperc% ${membar 10,106}
    HDD:$alignr${fs_used_perc /}% ${fs_bar 10,106 /}
    BAT:$alignr${battery_percent}% ${battery_bar 10,106}
    $hr
    Download: Upload:
    eth0 ${downspeed eth0} $alignr${upspeed eth0}
    wlan0 ${downspeed wlan0} $alignr${upspeed wlan0}
    $hr
    ${alignc}ARCH NEWS
    ${rss http://www.archlinux.org/feeds/news/ 1 item_titles 10 }
    I know this looks confusing and probably is full of critical error, but that simple because I'm a conky noob. I basically just downloaded a profile I liked and completely changed it over the course of a few hours.
    Anyway, I'm rambling again, but if you've got any idea's, please do let me know.
    Best regards.
    Last edited by zacariaz (2012-08-27 17:19:35)

    Okay, so I've found sort of a solution to part of the problem, so what I have so far look like this:
    wget -quiet -O - archlinux.org/feeds/news/ | fmt -w 25 -g 25
    It works as long as there are no words longer than 25 character, which I should think is rare, even including package names and such.
    However there's still the issue parsing the xml so I get only what I want:
    <item><title>$content</title><link>
    This may be solved using some sort of terminal rss parser, but I would rather prefer not to.
    Then there's the issue with reloading.
    My current conky is set to reload every second, but of course one can't just pull the feed every second and I'm not convinced that conky has any built in solution for that problem. Of course I can always start a cronjob and save it all to a file, but portability would be nice.
    anyway, I'll return later.

  • [SOLVED] Conky, Gmail, and STDOUT Question

    I currently have Conky working with a script to check my gmail (gmail.pl).  It works as intended in conky, but it saves all the output from the script to STDOUT.  This isn't a problem until I log out of openbox and my screen is filled with these things:
    --2008-10-03 09:28:50-- https://<username>:*password*@mail.google.com/mail/feed/atom
    Resolving mail.google.com... 209.85.147.83, 209.85.147.19, 209.85.147.18
    Connecting to mail.google.com|209.85.147.83|:443... connected.
    HTTP request sent, awaiting response... 401 Unauthorized
    Connecting to mail.google.com|209.85.147.83|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: unspecified [text/xml]
    Saving to: `STDOUT'
    [ <=> ] 1,005 --.-K/s in 0s
    2008-10-03 09:28:51 (244 MB/s) - `-' saved [1005]
    It's not really a problem as much as an annoyance I guess.
    What I THINK I would like to do is pipe the output to /dev/null?  Or save it to /dev/null?  I am just not sure how to do this.  I went through the script itself and couldn't figure it out.  Any ideas?  Here is the script:
    #!/usr/bin/perl
    use Switch;
    use Text::Wrap;
    my $what=$ARGV[0];
    $user="<username>"; #username for gmail account
    $pass="<password>"; #password for gmail account
    $file="/tmp/gmail.html"; #temporary file to store gmail
    #wrap format for subject
    $Text::Wrap::columns=65; #Number of columns to wrap subject at
    $initial_tab=""; #Tab for first line of subject
    $subsequent_tab="\t"; #tab for wrapped lines
    $quote="\""; #put quotes around subject
    #limit the number of emails to be displayed
    $emails=4; #if -1 display all emails
    &passwd; #give password the proper url character encoding
    switch($what){ #determine what the user wants
    case "n" {&gmail; print "$new\n";} #print number of new emails
    case "s" { #print $from and $subj for new email
    &gmail;
    if ($new>0){
    my $size=@from;
    if ($emails!=-1 && $size>$emails){$size=$emails;} #limit number of emails displayed
    for(my $i=0; $i<$size; ++$i){
    print "From: $from[$i]\n"; #print from line
    $text=$quote.$subj[$i].$quote."\n";
    print wrap($initial_tab, $subsequent_tab, $text); #print subject with word wrap
    $size=@from;
    if ($emails!=-1 && $size >$emails){print "$emails out of $size new emails displayed\n";}
    case "e" { #print number of new emails, $from, and $subj
    &gmail;
    if($new==0){print "You have no new emails.\n";}
    else{
    print "You have $new new email(s).\n";
    my $size=@from;
    if ($emails!=-1 && $size>$emails){$size=$emails;} #limit number of emails displayed
    for(my $i=0; $i<$size; ++$i){
    print "From: $from[$i]\n"; #print from line
    $text=$quote.$subj[$i].$quote;
    print wrap($initial_tab, $subsequent_tab, $text); #print subject with word wrap
    $size=@from;
    if ($emails!=-1 && $size >$emails){print "$emails out of $size new emails displayed\n";}
    else {
    print "Usage Error: gmail.pl <option>\n";
    print "\tn displays number of new emails\n";
    print "\ts displays from line and subject line for each new email.\n";
    print "\te displays the number of new emails and from line plus \n";
    print "\t\tsubject line for each new email.\n";
    } #didn't give proper option
    sub gmail{
    if(!(-e $file)){ #create file if it does not exists
    `touch $file`;
    #get new emails
    `wget -O - https://$user:$pass\@mail.google.com/mail/feed/atom --no-check-certificate> $file`;
    open(IN, $file); #open $file
    my $i=0; #initialize count
    $new=0; #initialize new emails to 0
    my $flag=0;
    while(<IN>){ #cycle through $file
    if(/<entry>/){$flag=1;}
    elsif(/<fullcount>(\d+)<\/fullcount>/){$new=$1;} #grab number of new emails
    elsif($flag==1){
    if(/<title>.+<\/title>/){push(@subj, &msg);} #grab new email titles
    elsif(/<name>(.+)<\/name>/){push(@from, $1); $flag=0;} #grab new email from lines
    close(IN); #close $file
    sub passwd{ #change to url escape codes in password
    #URL ESCAPE CODES
    $_=$pass;
    s/\%/\%25/g;
    s/\#/\%23/g;
    s/\$/\%24/g;
    s/\&/\%26/g;
    s/\//\%2F/g;
    s/\:/\%3A/g;
    s/\;/\%3B/g;
    s/\</\%3C/g;
    s/\=/\%3D/g;
    s/\>/\%3E/g;
    s/\?/\%3F/g;
    s/\@/\%40/g;
    s/\[/\%5B/g;
    s/\\/\%5C/g;
    s/\]/\%5D/g;
    s/\^/\%5E/g;
    s/\`/\%60/g;
    s/\{/\%7B/g;
    s/\|/\%7C/g;
    s/\}/\%7D/g;
    s/\~/\%7E/g;
    $pass=$_;
    sub msg{
    #THE HTML CODED CHARACTER SET [ISO-8859-1]
    chomp; s/<title>(.+)<\/title>/$1/; #get just the subject
    #now replace any special characters
    s/\&\#33\;/!/g; #Exclamation mark
    s/\&\#34\;/"/g; s/\&quot\;/"/g; #Quotation mark
    s/\&\#35\;/#/g; #Number sign
    s/\&\#36\;/\$/g; #Dollar sign
    s/\&\#37\;/%/g; #Percent sign
    s/\&\#38\;/&/g; s/\&amp\;/&/g; #Ampersand
    s/\&\#39\;/'/g; #Apostrophe
    s/\&\#40\;/(/g; #Left parenthesis
    s/\&\#41\;/)/g; #Right parenthesis
    s/\&\#42\;/*/g; #Asterisk
    s/\&\#43\;/+/g; #Plus sign
    s/\&\#44\;/,/g; #Comma
    s/\&\#45\;/-/g; #Hyphen
    s/\&\#46\;/./g; #Period (fullstop)
    s/\&\#47\;/\//g; #Solidus (slash)
    s/\&\#58\;/:/g; #Colon
    s/\&\#59\;/\;/g; #Semi-colon
    s/\&\#60\;/</g; s/\&lt\;/</g; #Less than
    s/\&\#61\;/=/g; #Equals sign
    s/\&\#62\;/>/g; s/\&gt\;/>/g; #Greater than
    s/\&\#63\;/\?/g; #Question mark
    s/\&\#64\;/\@/g; #Commercial at
    s/\&\#91\;/\[/g; #Left square bracket
    s/\&\#92\;/\\/g; #Reverse solidus (backslash)
    s/\&\#93\;/\]/g; #Right square bracket
    s/\&\#94\;/\^/g; #Caret
    s/\&\#95\;/_/g; #Horizontal bar (underscore)
    s/\&\#96\;/\`/g; #Acute accent
    s/\&\#123\;/\{/g; #Left curly brace
    s/\&\#124\;/|/g; #Vertical bar
    s/\&\#125\;/\}/g; #Right curly brace
    s/\&\#126\;/~/g; #Tilde
    s/\&\#161\;/¡/g; #Inverted exclamation
    s/\&\#162\;/¢/g; #Cent sign
    s/\&\#163\;/£/g; #Pound sterling
    s/\&\#164\;/¤/g; #General currency sign
    s/\&\#165\;/¥/g; #Yen sign
    s/\&\#166\;/¦/g; #Broken vertical bar
    s/\&\#167\;/§/g; #Section sign
    s/\&\#168\;/¨/g; #Umlaut (dieresis)
    s/\&\#169\;/©/g; s/\&copy\;/©/g; #Copyright
    s/\&\#170\;/ª/g; #Feminine ordinal
    s/\&\#171\;/«/g; #Left angle quote, guillemotleft
    s/\&\#172\;/¬/g; #Not sign
    s/\&\#174\;/®/g; #Registered trademark
    s/\&\#175\;/¯/g; #Macron accent
    s/\&\#176\;/°/g; #Degree sign
    s/\&\#177\;/±/g; #Plus or minus
    s/\&\#178\;/²/g; #Superscript two
    s/\&\#179\;/³/g; #Superscript three
    s/\&\#180\;/´/g; #Acute accent
    s/\&\#181\;/µ/g; #Micro sign
    s/\&\#182\;/¶/g; #Paragraph sign
    s/\&\#183\;/·/g; #Middle dot
    s/\&\#184\;/¸/g; #Cedilla
    s/\&\#185\;/¹/g; #Superscript one
    s/\&\#186\;/º/g; #Masculine ordinal
    s/\&\#187\;/»/g; #Right angle quote, guillemotright
    s/\&\#188\;/¼/g; s/\&frac14\;/¼/g; # Fraction one-fourth
    s/\&\#189\;/½/g; s/\&frac12\;/½/g; # Fraction one-half
    s/\&\#190\;/¾/g; s/\&frac34\;/¾/g; # Fraction three-fourths
    s/\&\#191\;/¿/g; #Inverted question mark
    s/\&\#192\;/À/g; #Capital A, grave accent
    s/\&\#193\;/Á/g; #Capital A, acute accent
    s/\&\#194\;/Â/g; #Capital A, circumflex accent
    s/\&\#195\;/Ã/g; #Capital A, tilde
    s/\&\#196\;/Ä/g; #Capital A, dieresis or umlaut mark
    s/\&\#197\;/Å/g; #Capital A, ring
    s/\&\#198\;/Æ/g; #Capital AE dipthong (ligature)
    s/\&\#199\;/Ç/g; #Capital C, cedilla
    s/\&\#200\;/È/g; #Capital E, grave accent
    s/\&\#201\;/É/g; #Capital E, acute accent
    s/\&\#202\;/Ê/g; #Capital E, circumflex accent
    s/\&\#203\;/Ë/g; #Capital E, dieresis or umlaut mark
    s/\&\#204\;/Ì/g; #Capital I, grave accent
    s/\&\#205\;/Í/g; #Capital I, acute accent
    s/\&\#206\;/Î/g; #Capital I, circumflex accent
    s/\&\#207\;/Ï/g; #Capital I, dieresis or umlaut mark
    s/\&\#208\;/Ð/g; #Capital Eth, Icelandic
    s/\&\#209\;/Ñ/g; #Capital N, tilde
    s/\&\#210\;/Ò/g; #Capital O, grave accent
    s/\&\#211\;/Ó/g; #Capital O, acute accent
    s/\&\#212\;/Ô/g; #Capital O, circumflex accent
    s/\&\#213\;/Õ/g; #Capital O, tilde
    s/\&\#214\;/Ö/g; #Capital O, dieresis or umlaut mark
    s/\&\#215\;/×/g; #Multiply sign
    s/\&\#216\;/Ø/g; #Capital O, slash
    s/\&\#217\;/Ù/g; #Capital U, grave accent
    s/\&\#218\;/Ú/g; #Capital U, acute accent
    s/\&\#219\;/Û/g; #Capital U, circumflex accent
    s/\&\#220\;/Ü/g; #Capital U, dieresis or umlaut mark
    s/\&\#221\;/Ý/g; #Capital Y, acute accent
    s/\&\#222\;/Þ/g; #Capital THORN, Icelandic
    s/\&\#223\;/ß/g; #Small sharp s, German (sz ligature)
    s/\&\#224\;/à/g; #Small a, grave accent
    s/\&\#225\;/á/g; #Small a, acute accent
    s/\&\#226\;/â/g; #Small a, circumflex accent
    s/\&\#227\;/ã/g; #Small a, tilde
    s/\&\#228\;/ä/g; #Small a, dieresis or umlaut mark
    s/\&\#229\;/å/g; #Small a, ring
    s/\&\#230\;/æ/g; #Small ae dipthong (ligature)
    s/\&\#231\;/ç/g; #Small c, cedilla
    s/\&\#232\;/è/g; #Small e, grave accent
    s/\&\#233\;/é/g; #Small e, acute accent
    s/\&\#234\;/ê/g; #Small e, circumflex accent
    s/\&\#235\;/ë/g; #Small e, dieresis or umlaut mark
    s/\&\#236\;/ì/g; #Small i, grave accent
    s/\&\#237\;/í/g; #Small i, acute accent
    s/\&\#238\;/î/g; #Small i, circumflex accent
    s/\&\#239\;/ï/g; #Small i, dieresis or umlaut mark
    s/\&\#240\;/ð/g; #Small eth, Icelandic
    s/\&\#241\;/ñ/g; #Small n, tilde
    s/\&\#242\;/ò/g; #Small o, grave accent
    s/\&\#243\;/ó/g; #Small o, acute accent
    s/\&\#244\;/ô/g; #Small o, circumflex accent
    s/\&\#245\;/õ/g; #Small o, tilde
    s/\&\#246\;/ö/g; #Small o, dieresis or umlaut mark
    s/\&\#247\;/÷/g; #Division sign
    s/\&\#248\;/ø/g; #Small o, slash
    s/\&\#249\;/ù/g; #Small u, grave accent
    s/\&\#250\;/ú/g; #Small u, acute accent
    s/\&\#251\;/û/g; #Small u, circumflex accent
    s/\&\#252\;/ü/g; #Small u, dieresis or umlaut mark
    s/\&\#253\;/ý/g; #Small y, acute accent
    s/\&\#254\;/þ/g; #Small thorn, Icelandic
    s/\&\#255\;/ÿ/g; #Small y, dieresis or umlaut mark
    s/^\s+//;
    return $_;
    Last edited by monstermudder78 (2008-10-03 20:34:04)

    The fix was to change conky from:
    ${execi 60 perl ~/scripts/gmail.pl n}
    To:
    ${execi 60 perl ~/scripts/gmail.pl n 2>/dev/null}
    (Added 2>/dev/null, sending the error messages to /dev/null.)
    Last edited by monstermudder78 (2008-10-03 20:37:19)

  • [SOLVED] Conky lua problem (transparency)

    Hi,
    I'm trying to transfer my conky from Ubuntu to Arch: below is a screenshot of the Ubuntu version (what it should look like).  On Arch I have a solid black background.   If it's relevant, I'm running Archbang rather than pure Arch, so with Openbox.
    My main issue at the moment is the semi-transparency (and I'd like to have the rounded corners too).   I understand that conky 1.8.0 can do transparency, but only with a compositor, and I'd rather keep my system as light as possible.  So I've replaced my conky with 1.7.2 conky-lua from AUR and (don't know if this was necessary) installed cairo and lua from the repos.   Unfortunately the lua script I used on Ubuntu isn't working; when I run conky in the terminal I get the message ".conkyrc: 121: config file error".  At lines 120 and 121 I have my
    lua_load ~/scripts/draw_bg.lua
            lua_draw_hook_pre
    My .conkyrc and lua script are below.  Thanks for looking!
    # conky configuration
    # edited by Mark Buck (Kaivalagi) <[email protected]>
    # set to yes if you want Conky to be forked in the background
    background no
    # 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-*-*-*-*-*-*-*
    # Use Xft?
    use_xft yes
    # Xft font when Xft is enabled
    xftfont Bitstream Vera Sans Mono:size=9
    # Text alpha when using Xft
    xftalpha 0.8
    # Update interval in seconds
    update_interval 1.0
    # This is the number of times Conky will update before quitting.
    # Set to zero to run forever.
    total_run_times 0
    # Use double buffering (reduces flicker, may not work for everyone)
    double_buffer yes
    # Minimum size of text area
    minimum_size 200 700
    maximum_width 200
    # Draw shades?
    draw_shades yes
    # Draw outlines?
    draw_outline no
    # Draw borders around text
    draw_borders no
    draw_graph_borders yes
    # Stippled borders?
    stippled_borders 8
    # border margins
    border_inner_margin 2
    border_outer_margin 2
    # border width
    border_width 1
    # Default colors and also border colors
    default_color white
    default_shade_color black
    default_outline_color white
    # own window options
    own_window yes
    own_window_type desktop
    #own_window_hints undecorated,skip_taskbar
    # Text alignment, other possible values are commented
    #alignment top_left
    alignment top_right
    #alignment bottom_left
    #alignment bottom_right
    # Gap between borders of screen and text
    # same thing as passing -x at command line
    gap_x 5
    gap_y 35
    # Subtract file system buffers from used memory?
    no_buffers yes
    # set to yes if you want all text to be in uppercase
    uppercase no
    # number of cpu samples to average
    # set to 1 to disable averaging
    cpu_avg_samples 2
    # number of net samples to average
    # set to 1 to disable averaging
    net_avg_samples 2
    # Force UTF8? note that UTF8 support required XFT
    override_utf8_locale yes
    # Add spaces to keep things from moving about? This only affects certain objects.
    use_spacer right
    # colours
    color1 white
    # light blue
    color2 6892C6
    color3 6892C6
    # green
    color4 78BF39
    # red
    color5 CC0000
    color6 88ff88
    text_buffer_size 2048
    # variable is given either in format $variable or in ${variable}. Latter
    # allows characters right after the variable and must be used in network
    # stuff because of an argument
    # stuff after 'TEXT' will be formatted on screen
    lua_load ~/scripts/draw_bg.lua
    lua_draw_hook_pre
    TEXT
    ${offset -5}${font StyleBats:style=CleanCut:size=12}q ${voffset -2}${font Bitstream Vera Sans Mono:style=Bold:size=11}Weather${font} ${hr}${color1}
    ${execpi 1800 conkyForecast --location=MZXX0003 --template=/home/mark/conky/conkyForecast.template}
    ${goto 25}${color1}${font Bitstream Vera Sans Mono:size=14}${execi 1800 conkyForecast --location=MZXX0003 --datatype=CT}${font}
    ${goto 20}${font ConkyWeather:style=Bold:size=30}${execi 1800 conkyForecast --location=MZXX0003 --datatype=WF} ${goto 120}${font ConkyWindNESW:size=30}${execi 1800 conkyForecast --location=MZXX0003 --datatype=BS}${font}
    ${goto 10}${execi 1800 conkyForecast --location=MZXX0003 --datatype=HT --centeredwidth=4}/${execi 1800 conkyForecast --location=MZXX0003 --datatype=LT --centeredwidth=4} ${goto 100}${execi 1800 conkyForecast --location=MZXX0003 --datatype=WS --imperial} - ${execi 1800 conkyForecast --location=MZXX0003 --datatype=WD}
    $if_mpd_playing${offset -5}${font StyleBats:style=CleanCut:size=12}q ${voffset -2}${font Bitstream Vera Sans Mono:style=Bold:size=11}Music${font} ${hr}${color1}
    ${font Bitstream Vera Sans:size=9}${color2}MPD:${color6} $mpd_status
    ${color}${texeci 10 /home/mark/conky/composer.sh}
    ${font Bitstream Vera Sans:size=9}$color$mpd_artist
    ${font Bitstream Vera Sans:size=9}$mpd_album
    ${font Bitstream Vera Sans:size=9}$mpd_title
    ${color #ccddff} ${mpd_bar 5, 100}
    $endif
    ${offset -5}${font StyleBats:style=CleanCut:size=12}q ${voffset -2}${font Bitstream Vera Sans Mono:style=Bold:size=11}${color1}System${font} ${hr}${color1}
    ${color2}CPU Temp: ${color}${acpitemp}${color}°${font Bitstream Vera Sans Mono:size=9}
    $color2}CPU1: $color${cpu cpu1}% ${cpubar cpu1 4,65}${font Bitstream Vera Sans Mono:size=9}
    $color2}CPU2: $color${cpu cpu2}% ${cpubar cpu2 4,65}${font Bitstream Vera Sans Mono:size=9}
    ${color2}RAM:$color $mem/$memmax
    ${color2}Root: $color${fs_used /}/${fs_size /}${font Bitstream Vera Sans Mono:size=9}
    ${color2}Home: $color${fs_used /home/}/${fs_size /home/}${font Bitstream Vera Sans Mono:size=9}
    ${color2}Today:${color6}${execi 10 vnstat -i eth0 | grep "today" | awk '{print $5 $6}'}${goto 120}${color1}${execi 10 vnstat -i eth0 | grep "today" | awk '{print $8 $9}'}
    ${color2}Week: ${color6}${execi 10 vnstat -i eth0 -w | grep "current week" | awk '{print $6 $7}'}${goto 120}${color1}${execi 10 vnstat -i eth0 -w | grep "current week" | awk '{print $9 $10}'}
    ${color2}Month: ${color6}${execi 10 vnstat -i eth0 -m | grep "`date +"%b '%y"`" | awk '{print $6 $7}'}${goto 120}${color1}${execi 10 vnstat -i eth0 -m | grep "`date +"%b '%y"`" | awk '{print $9 $10}'}${font}
    ${color2}Battery:$color ${color red}${battery_bar 4,50 BAT0}
    Background by londonali1010 (2009)
    This script draws a background to the Conky window. It covers the whole of the Conky window, but you can specify rounded corners, if you wish.
    To call this script in Conky, use (assuming you have saved this script to ~/scripts/):
    lua_load ~/scripts/draw_bg.lua
    lua_draw_hook_pre
    Changelog:
    + v1.0 -- Original release (07.10.2009)
    -- Change these settings to affect your background.
    -- "corner_r" is the radius, in pixels, of the rounded corners. If you don't want rounded corners, use 0.
    corner_r=15
    -- Set the colour and transparency (alpha) of your background.
    bg_colour=0x000000
    bg_alpha=0.4
    require 'cairo'
    function rgb_to_r_g_b(colour,alpha)
    return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
    end
    function conky_draw_bg()
    if conky_window==nil then return end
    local w=conky_window.width
    local h=conky_window.height
    local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, w, h)
    cr=cairo_create(cs)
    cairo_move_to(cr,corner_r,0)
    cairo_line_to(cr,w-corner_r,0)
    cairo_curve_to(cr,w,0,w,0,w,corner_r)
    cairo_line_to(cr,w,h-corner_r)
    cairo_curve_to(cr,w,h,w,h,w-corner_r,h)
    cairo_line_to(cr,corner_r,h)
    cairo_curve_to(cr,0,h,0,h,0,h-corner_r)
    cairo_line_to(cr,0,corner_r)
    cairo_curve_to(cr,0,0,0,0,corner_r,0)
    cairo_close_path(cr)
    cairo_set_source_rgba(cr,rgb_to_r_g_b(bg_colour,bg_alpha))
    cairo_fill(cr)
    end
    Last edited by Henry Flower (2010-04-13 04:54:08)

    The error in line 121 is because of lua_draw_hook_pre command must have a function name. In your file, it would be:
    lua_draw_hook_pre draw_bg
    To get the transparency put the command:
    own_window_transparent yes
    I have tried this in an AwesomeWM, with conky 1.8.0 compiled with lua support, and without compositing.

  • [SOLVED] Conky Disappears!

    Check it.  I'll start conky, left click in irssi, then left click anywhere on my desktop.  Then, conky disappears!  It still running ofcourse..
    background no
    own_window yes
    own_window_transparent yes
    own_window_type desktop
    double_buffer yes
    update_interval 1
    use_xft yes
    xftfont glisp:size=8
    xftalpha 0.5
    border_margin 2
    border_width 2
    alignment bottom_right
    gap_x 2
    gap_y 2
    TEXT
    ${color #606060}${time} | ${color #606060}${battery} | ${color #606060}${wireless_link_bar wlan0}
    Maybe it's something in my config?
    Thanks!
    //Changing own_window_type to root, and adding own_window_hints undecorate,sticky seems to work!
    Last edited by crispus (2008-10-14 05:34:39)

    I was going to suggest adding
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    but I see that you've already solved it.
    With own_window_hints, you should be able to leave own_window_type as "desktop".

Maybe you are looking for

  • Spry Tabbed Panels2 IE8 Issue

    I have a problem where I have Spry Tabbed Panels 2 implemented in a Magento CMS page.  In Opera, Firefox, Safari it works exactly as I want.  In IE (I have IE8, but I've been told the problem also shows up in IE7) the content displays for the first t

  • Creative Cloud had me update Lightroom. Now have two versions. Neither works. What is Adobe doing?

    Creative Cloud had me update Lightroom. Now have two versions. Neither works. What is Adobe doing?

  • Macbook pro osx v 10.9.5 will not recognize or play netflix dvds

    My macbook pro osx 10.9.5   2.4 GHZ Intel Core i5 will not longer play any netflix dads.  I have even tried 2 separate external stand alone drives hooked up to my mbp via usb and 4 different movies and one will play in any source and the discs are in

  • Windows 8 Internet Issues.

    Hello, I bought a new PC recently and Windows 8 came pre-installed. Now, every 5 minutes. The network disconnects itself. If it lasts more than 5 minutes, it's slower than a snail! I've talked to an Answer tech on the Microsoft Answer Desk many times

  • Title fade in iMovie.

    Hey Guys, I'm new to iMovie and absolutely love it, however I find that when I use the subtitled stripe, it fades in nicely but doesn't fade out at all. Is there a way to have it fade in and out smoothly? Thanks in advance.