SEARCH

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

You are not logged in.

#3551 2012-11-02 04:27:48

McLovin
#! CrunchBanger
From: my computer chair
Registered: 2009-02-28
Posts: 105
Website

Re: Conky v1.9 Thread

My latest work in progress, I still have a bit to do with this one, just want to get some input from you guys.
I'm using part of Sector11's Chronograph.lua, as well as a separate lua script for the backgrounds of the clock.
The cpu bars grow out from the center with activity, (it takes 2 bars for each core, but I like the look)
I'm gonna change the network activity and if I can figure out how to do it, the diskio to lua graphs, so that i can do a bit more custom stuff with them.
And then there is the usual stuff, gmail, gcal, now playing shows when a media player is running, displaying song info, album art, etc.

acs3u0Mo.jpg
This is the set-up without media playing,

abbi4sBl.jpg
and this is with media playing.

Let me know what you all think of it so far, still have a bit to do, but I think its coming along nicely, and wanted to see what others thought.


8o Got /? | The first GUI, and "on-line" system was created in 1968 by Douglas Engelbart, the system included modern day innovations such as video conferencing, and on-line file sharing.

Offline

Be excellent to each other!

#3552 2012-11-02 12:26:33

dk75
#! Junkie
Registered: 2012-06-14
Posts: 250

Re: Conky v1.9 Thread

mrpeachy wrote:
dk75 wrote:
mrpeachy wrote:

@dk75
i tried installing the deb but got some missing dependancy issues, will try and track them down and see if i can get it running

Could you try this DEB (amd64, Debian Sid/unstable) and see if you have problem with dependencies?

Thanks dk75... tried it, got this

Error: Dependency is not satisfiable:
libmicrohttpd10

i should probably mention that i am using linux mint 12

Ah, Oneiric based one... so there is no libmicrohttpd10 for it, libmicrohttpd5 only.
No worry, libmicrohttpd5 could coexist with libmicrohttpd10 with no problem.

So, there are packages build in wheezy environment, against libmicrohttpd5 library and with new GIT update from 1 Nov 2012 (some wlan fixes):
conky-pre2 i386 (451MiB)
conky-pre2 amd64 (453MiB)


Debian Sid (Minted) x86_64/3.12-10, Conky 2.0_pre, Xorg 7.7/1.15.0, KDE 4.11.5, Intel X3100
Lenovo T61, HITACHI HTS722010K9SA00 100GB, WDC_WD5000BEVT 500GB
Linux user No.: 483055 | Conky Pitstop

Offline

#3553 2012-11-02 12:57:43

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

Re: Conky v1.9 Thread

McLovin wrote:

My latest work in progress, I still have a bit to do with this one, just want to get some input from you guys.

No wonder the girl is screaming, look at her right eye!  ]:D  ]:D

Nice work, I'd like to see the lua for the clock background.


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

Offline

#3554 2012-11-02 13:11:35

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

Re: Conky v1.9 Thread

@ dk75 & mrpeachy - anyone else that is testing / wants to test Conky v2

I found out why conky v2 doesn't like my regular conkys.

## comment lines
# above text

Have to go through them as per the example, and add the LUA comment "block"

	--[[
# To use #! in a conky use: ${exec echo '#!'}
# killall conky && conky -c /media/5/Conky/S11_Chronograph.conky &
# Thank you - mrpeachy
	--]]

or for each line or segment of lines "--":

minimum_size 340 340  --## width, height
maximum_width 340     --## width

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

Offline

#3555 2012-11-02 13:24:09

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

Re: Conky v1.9 Thread

Sector11 wrote:
McLovin wrote:

My latest work in progress, I still have a bit to do with this one, just want to get some input from you guys.

No wonder the girl is screaming, look at her right eye!  ]:D  ]:D

Her right eye has a clock on it! 8)  lol  Besides that, looks like both eyes match.  Maybe it's supposed to be a vampire or other phlebotenum-animated being? wink
@McLovin:  Great work, dude.  Love the clock!

Offline

#3556 2012-11-02 18:35:11

GotSupreme
Banned
Registered: 2012-09-12
Posts: 114

Re: Conky v1.9 Thread

FIle system > Home >  No conky file.

So when I try and extract the .conky file to home folder I get permission denied  hmm

Offline

#3557 2012-11-02 18:45:27

dura
Bloated Gimp
From: interzone
Registered: 2012-09-15
Posts: 2,108

Re: Conky v1.9 Thread

sudo apt-get install conky

Then follow instructions above

You should have conky already if you are using #!

If you don't

sudo geany .conkyrc

Then copy and paste the conkyrc you want to use (the one you download from deviantart.

Copy and paste font file (ttf I'm guessing) into .fonts

Then save it in your home folder (as .conkyrc)

Restart conky

Last edited by dura (2012-11-02 19:49:23)

Offline

#3558 2012-11-02 20:13:27

GotSupreme
Banned
Registered: 2012-09-12
Posts: 114

Re: Conky v1.9 Thread

@dura, Heres what happens when I do that in terminal
I4j9X.png

Offline

#3559 2012-11-02 20:23:39

snowpine
#!-a-roo
Registered: 2008-11-24
Posts: 2,984

Re: Conky v1.9 Thread

^--- never use "sudo" for files in your /home folder, this will create permission problems.

Apart from that minor detail, it appears you are in the correct place to edit your conky config, you got this from here? smile

Last edited by snowpine (2012-11-02 20:25:48)


/hugged

Offline

#3560 2012-11-03 00:10:49

GotSupreme
Banned
Registered: 2012-09-12
Posts: 114

Re: Conky v1.9 Thread

I am so confused. Can someone take some snapshots and explain.   yikes

Offline

#3561 2012-11-03 00:15:11

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

Re: Conky v1.9 Thread

^ On how to copy and paste? 

Once you find the conky code you want to use, just create a new file in your editor and copy the content of the conky into it

Save it as  /home/your user name/.conkyrcnew

Then run it like this

conky -c .conkyrcnew

Edit - You may need to kill all conky files before running the above

killall conky

VSIDO | Words That Build Or Destroy

I dev VSIDO

Offline

#3562 2012-11-03 03:03:03

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

Re: Conky v1.9 Thread

dk75 wrote:
mrpeachy wrote:
dk75 wrote:

Could you try this DEB (amd64, Debian Sid/unstable) and see if you have problem with dependencies?

Thanks dk75... tried it, got this

Error: Dependency is not satisfiable:
libmicrohttpd10

i should probably mention that i am using linux mint 12

Ah, Oneiric based one... so there is no libmicrohttpd10 for it, libmicrohttpd5 only.
No worry, libmicrohttpd5 could coexist with libmicrohttpd10 with no problem.

So, there are packages build in wheezy environment, against libmicrohttpd5 library and with new GIT update from 1 Nov 2012 (some wlan fixes):
conky-pre2 i386 (451MiB)
conky-pre2 amd64 (453MiB)

still a no go

Error: Dependency is not satisfiable: libmysqlclient18 (>= 5.5.24+dfsg-1)

but i think i'll stick with 1.9 for the time being

Last edited by mrpeachy (2012-11-03 03:03:35)

Offline

#3563 2012-11-03 03:33:52

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

Re: Conky v1.9 Thread

mrpeachy wrote:

but i think i'll stick with 1.9 for the time being

I popped conky v2 into the back 40 (dual boot) , played with it for a while today.

Got everything above TEXT fixed up very similar to the example and did some basic stuff

conky.text = [[]]..
[[
Temps:
  CPU  ${platform f71882fg.2560 temp 1}° \
  MB  ${platform f71882fg.2560 temp 2}°\
  SDA  ${execi 15 hddtemp -n /dev/sda}°\
  GPU  ${nvidia temp}°

CPU %
  1: ${if_match ${cpu cpu1} < 10}00${cpu cpu1}\
${else}${if_match ${cpu cpu1} < 100}0${cpu cpu1}\
${else}${cpu cpu1}\
${endif}${endif}%\
  2: ${if_match ${cpu cpu2} < 10}00${cpu cpu2}\
${else}${if_match ${cpu cpu2} < 100}0${cpu cpu2}\
${else}${cpu cpu2}\
${endif}${endif}%\
  3: ${if_match ${cpu cpu3} < 10}00${cpu cpu3}\
${else}${if_match ${cpu cpu3} < 100}0${cpu cpu3}\
${else}${cpu cpu3}\
${endif}${endif}%\
${alignr 5}A: ${if_match ${cpu cpu0} < 10}00${cpu cpu0}\
${else}${if_match ${cpu cpu0} < 100}0${cpu cpu0}\
${else}${cpu cpu0}\
${endif}${endif}%

]]

Tried

man conky

... no man page-

... and I had problems running "draw-bg.lua" and I thought.; "When two come out I'll start over."

My reasoning: I'm not LUA literate, when 2.x comes out the commands below "conky.text = [[]].." will probably not be like they are for 1.9, they will probably be more like LUA code.

At which point I'll become a noob on the sidelines running a conky someone helped me get going and then just leave it.

OR: I'll lock conky v1.9 into place and keep my conkys as they are.

Last edited by Sector11 (2012-11-03 03:34:17)


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

Offline

#3564 2012-11-03 04:00:22

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

Re: Conky v1.9 Thread

GotSupreme wrote:

@dura, Heres what happens when I do that in terminal
http://i.imgur.com/I4j9X.png

OK so you have a conky - as said before sudo is not necessary and not wanted in your home directory:

geany ~/.conkyrc

Open it that way and save it.  Now to run it just use:

conky

If you want your own and do NOT want to mess with the conky that came with #! do what VastOne suggested with a twist:

geany ~/.conkyrc

and select [Save as] and save it as anything you want: .conkyrcnew is just fine and start it:

conky -c ~/.conkyrcnew &

Now you would edit:

geany ~/.conkyrcnew

and modify it to be anything you like.

Check out Conky PitStop: Conky Setup Guide

... you can bypass the "Install Conky" part - you have it.

NOTE:  Saw VastOne's post as I was doing this in a separate tab.  Didn't mean to step on toes.  So Sorry.

Last edited by Sector11 (2012-11-03 04:02:05)


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

Offline

#3565 2012-11-03 07:33:13

McLovin
#! CrunchBanger
From: my computer chair
Registered: 2009-02-28
Posts: 105
Website

Re: Conky v1.9 Thread

Ok, I have made another new config, a more or less completion of the one I previewed last time, but I have added some things to it, and made a download for it, let me know what you all think.
It has the usual things, the CPU activity bars come out from the center, the system temps are shown in the bars, at the bottom it scrolls the no media player is running, unless you are running one, then it shows now playing info, there is also a transmission ection under the gmail display, that only shows if transmission is running.
The big clock in the middle is based off of Sector11's Chronograph, (thanx for letting me "borrow" that, teehee)' and has the current weather in the middle as you can see, using the conkyForcast.py from conkycompanions.
I am going to redo it at some point, and make a new weather script based on TeoBigusGeekus weather script, and change the graphs for the network and diskio to lua, (still can't get the lua script to show diskio, if anyone has any ideas, I'm open to hear them)
Let me know what you all think.

adpz74ik.jpg


and you can download the config here http://dl.dropbox.com/u/124517/conky-co … ars.tar.gz

Last edited by McLovin (2012-11-15 18:22:11)


8o Got /? | The first GUI, and "on-line" system was created in 1968 by Douglas Engelbart, the system included modern day innovations such as video conferencing, and on-line file sharing.

Offline

#3566 2012-11-03 08:08:42

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

Re: Conky v1.9 Thread

^there are some challenges to using diskio and similar conky objects, particularly with a bar/indicator
1 - the output comes as a number with units
2 - the units change
3 - the range of units from B to MiB is very large
4 - how do you set a max value?

so for 1 - you need to have your lua script separate the numbers and units
2 - you need the lua script to adjust the numbers based on the units so that you have a consistent output
ie pick a unit (bytes for example) and convert all outputs to that unit
3 - you might want to use a logarithimic scale otherwise you wont see any activity in your bar
you can do these calculations in lua
4 - i guess you can just pick a number that you think is high enough
or you could have the script log the diskio output and self adjust the max value based on the highest value to date

Last edited by mrpeachy (2012-11-03 08:09:07)

Offline

#3567 2012-11-03 13:58:42

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Re: Conky v1.9 Thread

@mrpeachy

i've found this code but it won't work anymore sad i used it months ago but it doesn't work anymore. does the script doesn't work with conky 1.9 ?

--[[cpu usage recorded over time by mrpeachy 2010 based on a concept by dbro http://crunchbanglinux.org/forums/post/56845/#p56845]]
require 'cairo'
function bars(sum, hori, vert, width, text)
--BACKGROUND BAR
cairo_translate (cr, hori, vert)
cairo_set_source_rgba (cr, 1, 1, 1, 0.2)
cairo_set_line_width (cr, width)
cairo_move_to (cr, 0, 0)
cairo_rel_line_to (cr, 0, -100)
cairo_stroke (cr)
cairo_translate (cr, -hori, -vert)
--INDICATOR BAR
cairo_translate (cr, hori, vert)
cairo_set_source_rgba (cr, 1, 1, 1, 1)
cairo_set_line_width (cr, width)
cairo_move_to (cr, 0, 0)
cairo_rel_line_to (cr, 0, -sum)
cairo_stroke (cr)
cairo_translate (cr, -hori, -vert)
--TEXT PRINTING
cairo_translate (cr, hori, vert)
cairo_select_font_face (cr, "White Rabbit", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 14);
cairo_rotate (cr, 90*math.pi/180)
cairo_move_to (cr, 5, 4)
cairo_show_text (cr, text);
cairo_rotate (cr, -90*math.pi/180)
cairo_translate (cr, -hori, -vert)
end

function conky_draw_graph()
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
cr = cairo_create(cs)
local updates=tonumber(conky_parse('${updates}'))
--INITIALIZING ARRAYS--if changes are made to the below section conky must be killed and restarted
if updates==1 then     
minlength=60
mintable={} 
min5length=(60*5)
min5table={}
min15length=(60*15)
min15table={}
min30length=(60*30)
min30table={}
min60length=(60*60)
min60table={}
end
--END OF INITIALIZATION---------------------------------------------------------
if updates> 3 then
--CALCULATIONS OVER 1 MINUTE----------------------------------------------------
for i = 1, tonumber(minlength) do
if mintable[i+1]==nil then mintable[i+1]=0 end
mintable[i]=mintable[i+1]    
if i==minlength then
mintable[minlength]=tonumber(conky_parse('${cpu}'))
end
end   
--CALCULATE AVERAGE 
sum=0
for i=1,minlength do
if mintable[i]==nil then mintable[i]=0 end
sum=sum+mintable[i]
end
--END OF CALCULATIONS
--call draw function
hori=175
vert=200
width=20
sum=(sum/minlength)
text="01 MIN"
bars(sum, hori, vert, width, text)
--end call----------------------------------------------------------------------
--CALCULATIONS OVER 5 MINUTES---------------------------------------------------
for i = 1, tonumber(min5length) do
if min5table[i+1]==nil then min5table[i+1]=0 end
min5table[i]=min5table[i+1]    
if i==min5length then
min5table[min5length]=tonumber(conky_parse('${cpu}'))
end
end   
--CALCULATE AVERAGE
sum5=0
for i=1,min5length do
if min5table[i]==nil then min5table[i]=0 end
sum5=sum5+min5table[i]
end
--END OF CALCULATIONS
--call draw function
hori=150
vert=200
width=20
sum=(sum5/min5length)
text="05 MIN"
bars(sum, hori, vert, width, text)
--end call----------------------------------------------------------------------
--CALCULATIONS OVER 15 MINUTES--------------------------------------------------
for i = 1, tonumber(min15length) do
if min15table[i+1]==nil then min15table[i+1]=0 end
min15table[i]=min15table[i+1]    
if i==min15length then
min15table[min15length]=tonumber(conky_parse('${cpu}'))
end
end   
--CALCULATE AVERAGE
sum15=0
for i=1,min15length do
if min15table[i]==nil then min15table[i]=0 end
sum15=sum15+min15table[i]
end
--END OF CALCULATIONS
--call draw function
hori=125
vert=200
width=20
sum=(sum15/min15length)
text="15 MIN"
bars(sum, hori, vert, width, text)
--end call----------------------------------------------------------------------
--CALCULATIONS OVER 30 MINUTES--------------------------------------------------
for i = 1, tonumber(min30length) do
if min30table[i+1]==nil then min30table[i+1]=0 end
min30table[i]=min30table[i+1]    
if i==min30length then
min30table[min30length]=tonumber(conky_parse('${cpu}'))
end
end   
--CALCULATE AVERAGE
sum30=0
for i=1,min30length do
if min30table[i]==nil then min30table[i]=0 end
sum30=sum30+min30table[i]
end
--END OF CALCULATIONS
--call draw function
hori=100
vert=200
width=20
sum=(sum30/min30length)
text="30 MIN"
bars(sum, hori, vert, width, text)
--end call----------------------------------------------------------------------
--CALCULATIONS OVER 60 MINUTES--------------------------------------------------
for i = 1, tonumber(min60length) do
if min60table[i+1]==nil then min60table[i+1]=0 end
min60table[i]=min60table[i+1]    
if i==min60length then
min60table[min60length]=tonumber(conky_parse('${cpu}'))
end
end   
--CALCULATE AVERAGE
sum60=0
for i=1,min60length do
if min60table[i]==nil then min60table[i]=0 end
sum60=sum60+min60table[i]
end
--END OF CALCULATIONS
--call draw function
hori=75
vert=200
width=20
sum=(sum60/min60length)
text="60 MIN"
bars(sum, hori, vert, width, text)
--end call----------------------------------------------------------------------

--call draw function for current cpu--------------------------------------------
hori=200
vert=200
width=20
sum=tonumber(conky_parse('${cpu}'))
text="CURRENT"
bars(sum, hori, vert, width, text)
--end call----------------------------------------------------------------------
end
end

update of the german translation table:
http://crunchbang.org/forums/viewtopic. … 09#p267509

Last edited by lionhead (2012-11-03 15:28:11)

Offline

#3568 2012-11-03 18:02:24

McLovin
#! CrunchBanger
From: my computer chair
Registered: 2009-02-28
Posts: 105
Website

Re: Conky v1.9 Thread

mrpeachy wrote:

^there are some challenges to using diskio and similar conky objects, particularly with a bar/indicator
1 - the output comes as a number with units
2 - the units change
3 - the range of units from B to MiB is very large
4 - how do you set a max value?

so for 1 - you need to have your lua script separate the numbers and units
2 - you need the lua script to adjust the numbers based on the units so that you have a consistent output
ie pick a unit (bytes for example) and convert all outputs to that unit
3 - you might want to use a logarithimic scale otherwise you wont see any activity in your bar
you can do these calculations in lua
4 - i guess you can just pick a number that you think is high enough
or you could have the script log the diskio output and self adjust the max value based on the highest value to date

Yeah, these are the problems I've been having lol. I'm wondering if doing a conky_parse and telling the parse to display MB only, if that might work, and then using an autoscale call, still learning lua, only been at it for a like 2-3 weeks, so I'm still very new to it.
Thank you for the input though, I do appreciate it, I'll take all the help I can get.

Last edited by McLovin (2012-11-03 18:03:37)


8o Got /? | The first GUI, and "on-line" system was created in 1968 by Douglas Engelbart, the system included modern day innovations such as video conferencing, and on-line file sharing.

Offline

#3569 2012-11-03 18:22:31

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

Re: Conky v1.9 Thread

^ this is how i would split and convert, i have converted all to B here

io=conky_parse("${diskio}")
io_len=string.len(io)
split=string.find(io,"%a")
--split number and unit
io_num=tonumber(string.sub(io,1,split-1))
io_unit=string.sub(io,split,io_len)
--convert all to B
if io_unit=="KiB" then
io_num=io_num*(1024)
elseif io_unit=="MiB" then
io_num=io_num*(1024*1024)
end

the "%a" means any letter character, so split returns the number of characters along that the first letter is found
this gives me the basis of where to cut up the string using string.sub

always good to use tonumber in situations like this, not always needed, but good practice none the less smile

Last edited by mrpeachy (2012-11-03 18:34:40)

Offline

#3570 2012-11-03 20:51:50

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

Re: Conky v1.9 Thread

McLovin wrote:

The big clock in the middle is based off of Sector11's Chronograph, (thanx for letting me "borrow" that, teehee)' and has the current weather in the middle as you can see, using the conkyForcast.py from conkycompanions.

Oh you're more than welcome, you {cough cough} borrow mine, I {COUGH COUGH} borrow yours!  tit-for-tat lol
abh3qKio.jpg
We both learn!

I like it!


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

Offline

#3571 2012-11-03 21:32:47

McLovin
#! CrunchBanger
From: my computer chair
Registered: 2009-02-28
Posts: 105
Website

Re: Conky v1.9 Thread

Sector11 wrote:
McLovin wrote:

The big clock in the middle is based off of Sector11's Chronograph, (thanx for letting me "borrow" that, teehee)' and has the current weather in the middle as you can see, using the conkyForcast.py from conkycompanions.

Oh you're more than welcome, you {cough cough} borrow mine, I {COUGH COUGH} borrow yours!  tit-for-tat lol

We both learn!

I like it!

Lol, no problem.
I got inspired by the center growing bars, and am about to start work on a new one that promises to be epic, a hint, David Hasselhoff would love it.


8o Got /? | The first GUI, and "on-line" system was created in 1968 by Douglas Engelbart, the system included modern day innovations such as video conferencing, and on-line file sharing.

Offline

#3572 2012-11-03 23:30:43

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

Re: Conky v1.9 Thread

McLovin wrote:

Lol, no problem.
I got inspired by the center growing bars, and am about to start work on a new one that promises to be epic, a hint, David Hasselhoff would love it.

A Knight Rider Conky?

BTW - I got carried away with your, my, our Chronograph.  8o  Now it's a real Chronograph:
Next I try and married it up with v9000!

abijk6Lr.jpg

The conky: /media/5/Conky/McBars/Chronograph.conky

# killall conky & conky -c /media/5/Conky/McBars/Chronograph.conky &
######################
# - Conky settings - #
######################

background no
update_interval 1
cpu_avg_samples 1
total_run_times 0
override_utf8_locale yes

double_buffer yes
#no_buffers yes

text_buffer_size 1024 #10240
imlib_cache_size 0 #10240

minimum_size 350 350
maximum_width 350

#####################
# - Text settings - #
#####################
use_xft yes
xftfont CorporateMonoExtraBold:size=10
xftalpha 1 #.8

uppercase no

# Text alignment, other possible values are commented
#alignment middle_left
#alignment middle_middle
#alignment middle_right
#alignment top_middle
alignment top_left
#alignment top_right
#alignment bottom_left
#alignment bottom_right
#alignment bottom_middle

gap_x 5
gap_y 5


######################
# - Color settings - #
######################
default_color c3c3c3
default_shade_color gray
default_outline_color black

color0 c3c3c3 #mid gray
color1 FF0000 #red
color2 09FF00 #bright green
color3 007EFF #bright blue
color4 E3E3E3 #very light gray
color5 FF8600 #an orange shade
color6 CA8718 #a dust like color
color7 FFE500 #a darker yellow color
color8 C3FF00 #lime green
color9 00FCFF #sky blue
#############################
# - Window specifications - #
#############################
###################################################################################################
# - Create own window instead of using desktop (required in all file-managers, other than caja) - #
###################################################################################################
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 Chronograph


border_inner_margin 0
border_outer_margin 0

#########################
# - Graphics settings - #
#########################
draw_shades no #yes
draw_outline no
draw_borders no
stippled_borders 0
draw_graph_borders no

####################
# - LUA Settings - #
####################
#lua_load /media/5/conky/McBars_McLovin/McBars/scripts/draw-bg.lua  ###########################################################
#lua_draw_hook_pre draw_bg 20 0 0 0 0 0x000000 0.3  #### - Uncoment these lines to have BG-Image -#
#lua_draw_hook_post draw-bg 125 0 0 0 0 0x000000 0.01  ############################################
lua_load /media/5/Conky/McBars/scripts/Chronograph.lua
lua_draw_hook_post main
#lua_load /media/5/conky/McBars_McLovin/McBars/scripts/clock_rings.lua
#lua_draw_hook_pre clock_rings
lua_load /media/5/Conky/LUA/draw-bg.lua

TEXT
${lua conky_draw_bg 15 0 0 0 0 0x000000 0.5}${execpi 3600 conkyForecast --hideunits --template=/media/5/Conky/McBars/scripts/chronograph.weather.template}

/media/5/Conky/McBars/scripts/Chronograph.lua

--[[ multiple analogue clocks by mrpeachy - 18 Jun 2012
 21 Jun 2012 - Chronograph modifications by Sector11
 22 Jun 2012 - again with mrpeachy's help day names, numbers and month names

use in conkyrc

lua_load /path/Chronograph.lua
lua_draw_hook_pre main
TEXT


-- INDEX (use find with):

-- ###### 12 OR 24 CLOCK FACE
-- SET BORDER OPTIONS ######  ALL CLOCKS

-- ### START CLOCK A ######################################
-- MARKS AROUND CLOCK A -- Large Main 24 HR Clock
-- CLOCK A HOUR HAND
-- CLOCK A MINUTE HAND SETUP
-- CLOCK A SECOND HAND SETUP
-- CLOCK A ###### 24 HR TIME

-- ### START DIAL B ### Top - Week Day Names Dial #########
-- ### START DIAL C ### Right - Month Names Dial ##########
-- ### START DIAL D ### Left - Day Numbers Dial ###########

-- ### START CLOCK E ######################################
-- MARKS AROUND CLOCK E -- Bottom - 12 HR Clock
-- CLOCK E HOUR HAND
-- CLOCK E MINUTE HAND SETUP
-- CLOCK E SECOND HAND SETUP
-- CLOCK E ###### 12 HR TIME

NOTE:  Putting ### CLOCK A ### last insures that it's functions are written
       over the other dials.
]]

require 'cairo'

function conky_main()
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
cr = cairo_create(cs)
-- ########################################################
-- SETTINGS AREA
-- local cpu=conky_parse("${cpu}")
-- local red-1=conky_parse("${image ~/Conky/images/red_1.png -p 0,0 -s 35x35}")

-- ###### 12 OR 24 CLOCK FACE #############################
local clock_type_A=24 -- Large Main 24 HR Clock
local clock_type_E=12 -- Bottom - 12 HR Clock

-- ###### CLOCK SETTINGS ##################################
-- SET BORDER OPTIONS FOR "CLOCKS" ########################
local clock_border_width=0
-- set color and alpha for clock border
local cbr,cbg,cbb,cba=1,1,1,1  -- full opaque white
-- gap from clock border to minute marks
local b_to_m=1

-- ########################################################
-- ### START DIAL B ### Top - Week Day Names Dial #########
-- DIAL POSITION FOR TEXT
local center_x=175
local center_y=95
local radius=50
-- FONT
cairo_select_font_face (cr, "CorporateMonoExtraBold", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 12)
cairo_set_source_rgba (cr,1,1,1,1) --(cr,194/255,204/255,255/255,1)	-- (cr,1,1,1,1)
-- TABLE OF TEXT -- in order
text_days={"SUN","MON","TUE","WED","THR","FRI","SAT",}
-- text_days={"DOM","LUN","MAR","MIE","JUE","VIE","SAB",}
for i=1,7 do
-- work out points
local point=(math.pi/180)*((360/7)*(i-1))
local x=0+radius*(math.sin(point))
local y=0-radius*(math.cos(point))
-- CALCULATE CENTRE OF TEXT
local text=text_days[i]--gets text from table
local extents=cairo_text_extents_t:create()
cairo_text_extents(cr,text,extents)
local width=extents.width
local height=extents.height
cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
cairo_show_text (cr, text)
cairo_stroke (cr)
end
-- INNER POINTS POSITION, radius smaller than text circle
local radius=35
for i=1,7 do
local point=(math.pi/180)*((360/7)*(i-1))
local x=0+radius*(math.sin(point))
local y=0-radius*(math.cos(point))
cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
cairo_stroke (cr)
end
-- DRAW HAND -- snaps to current day of week
local hand_length=30
local day_number=tonumber(os.date("%w"))
local point=(math.pi/180)*((360/7)*(day_number))
local x=0+hand_length*(math.sin(point))
local y=0-hand_length*(math.cos(point))
local hand_width=2
cairo_move_to (cr,center_x,center_y)
cairo_line_to (cr,center_x+x,center_y+y)
cairo_stroke (cr)
-- ### END DIAL B #########################################

-- ########################################################
-- ### START DIAL C ### Right - Month Names Dial ##########
-- DIAL POSITION FOR TEXT
local center_x=260
local center_y=175
local radius=45
-- FONT
cairo_select_font_face (cr, "CorporateMonoExtraBold", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 12)
cairo_set_source_rgba (cr,1,1,1,1) --(cr,194/255,204/255,255/255,1)	-- (cr,1,1,1,1)
-- TABLE OF TEXT -- in order
text_days={"JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC",}
-- text_days={"ENE","FEB","MAR","ABR","MAY","JUN","JUL","AGO","SEP","OCT","NOV","DIC",}
for i=1,12 do
-- OUTTER POINTS POSTION FOR TEXT
local point=(math.pi/180)*((360/12)*(i-1))
local x=0+radius*(math.sin(point))
local y=0-radius*(math.cos(point))
-- CALCULATE CENTRE OF TEXT
local text=text_days[i]--gets text from table
local extents=cairo_text_extents_t:create()
cairo_text_extents(cr,text,extents)
local width=extents.width
local height=extents.height
cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
cairo_show_text (cr, text)
cairo_stroke (cr)
end
-- INNER POINTS POSITION, radius smaller than text circle
local radius=32
for i=1,12 do
local point=(math.pi/180)*((360/12)*(i-1))
local x=0+radius*(math.sin(point))
local y=0-radius*(math.cos(point))
cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
cairo_stroke (cr)
end
-- DRAW HAND -- snaps to current month
local this_month=tonumber(os.date("%m"))
local hand_length=28 --radius for this calculation
local point=(math.pi/180)*((360/12)*(this_month-1))
local x=0+hand_length*(math.sin(point))
local y=0-hand_length*(math.cos(point))
cairo_move_to (cr,center_x,center_y)
cairo_line_to (cr,center_x+x,center_y+y)
cairo_stroke (cr)

-- ### END CLOCK C ########################################

-- ########################################################
-- ### START DIAL D ### Left - Day Numbers Dial ###########
-- GET NUMBER OF DAYS IN CURRENT MONTH
-- calculate Feb, then set up table
year4num=os.date("%Y")
t1=os.time({year=year4num,month=03,day=01,hour=00,min=0,sec=0});
t2=os.time({year=year4num,month=02,day=01,hour=00,min=0,sec=0});
febdaynum=tonumber((os.difftime(t1,t2))/(24*60*60))
-- MONTH TABLE
monthdays={31,febdaynum,31,30,31,30,31,31,30,31,30,31}
this_month=tonumber(os.date("%m"))
number_days=monthdays[this_month]
-- TEXT positioning
local center_x=95
local center_y=175
local radius=50
cairo_select_font_face (cr, "CorporateMonoExtraBold", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 8)
cairo_set_source_rgba (cr,1,1,1,1) --(cr,194/255,204/255,255/255,1)	-- (cr,1,1,1,1)
for i=1,number_days do
-- OUTTER POINTS POSTION FOR TEXT
local point=(math.pi/180)*((360/number_days)*(i-1))
local x=0+radius*(math.sin(point))
local y=0-radius*(math.cos(point))
-- CALCULATE CENTRE OF TEXT
local text=i
local extents=cairo_text_extents_t:create()
cairo_text_extents(cr,text,extents)
local width=extents.width
local height=extents.height
cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
cairo_show_text (cr, text)
cairo_stroke (cr)
end
-- INNER POINTS POSITION, radius smaller than text circle
local radius=40
for i=1,number_days do
local point=(math.pi/180)*((360/number_days)*(i-1))
local x=0+radius*(math.sin(point))
local y=0-radius*(math.cos(point))
cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
cairo_stroke (cr)
end
-- DRAW HAND -- snaps to current DAY
local this_day=tonumber(os.date("%d"))
local hand_length=35--radius for this calculation
local point=(math.pi/180)*((360/number_days)*(this_day-1))
local x=0+hand_length*(math.sin(point))
local y=0-hand_length*(math.cos(point))
cairo_move_to (cr,center_x,center_y)
cairo_line_to (cr,center_x+x,center_y+y)
cairo_stroke (cr)
-- ### END CLOCK D ########################################

-- ########################################################
-- ### START CLOCK E ######################################
-- MARKS AROUND CLOCK E -- Bottom - 12 HR Clock
local number_marks_E=12
-- set mark length
local m_length_E=0
-- set mark width
local m_width_E=0
-- set mark line cap type
local m_cap=CAIRO_LINE_CAP_ROUND
-- set mark color and alpha,red blue green alpha
local mr,mg,mb,ma=1,1,0,1-- opaque white
-- SETUP HOUR HANDS #######################################
-- CLOCK E HOUR HAND
-- set length of hour hand
hh_length_E=25
-- set hour hand width
hh_width_E=2
-- set hour hand line cap
hh_cap=CAIRO_LINE_CAP_ROUND
-- set hour hand color
hhr,hhg,hhb,hha=1,1,0,1-- fully opaque white
-- SETUP MINUTE HANDS #####################################
-- CLOCK E MINUTE HAND SETUP
-- set length of minute hand
mh_length_E=35
-- set minute hand width
mh_width_E=2
-- set minute hand line cap
mh_cap=CAIRO_LINE_CAP_ROUND
-- set minute hand color
mhr,mhg,mhb,mha=1,1,0,1-- fully opaque white
-- SETUP SECOND HANDS #####################################
-- CLOCK E SECOND HAND SETUP
-- set length of seconds hand
sh_length_E=32
-- set hour hand width
sh_width_E=1
-- set hour hand line cap
sh_cap=CAIRO_LINE_CAP_ROUND
-- set seconds hand color
shr,shg,shb,sha=1,0,0,1-- fully opaque red
-- CLOCK E ###### 12 HR TIME ##############################
-- CLOCK SETTINGS
clock_radius=45
clock_centerx=175
clock_centery=260
-- DRAWING CODE
-- DRAW BORDER
cairo_set_source_rgba (cr,cbr,cbg,cbb,cba)
cairo_set_line_width (cr,clock_border_width)
cairo_arc (cr,clock_centerx,clock_centery,clock_radius,0,2*math.pi)
cairo_stroke (cr)
-- DRAW MARKS
-- stuff that can be moved outside of the loop, needs only be set once
-- calculate end and start radius for marks
m_end_rad=clock_radius-b_to_m
m_start_rad=m_end_rad-m_length_E
-- set line cap type
cairo_set_line_cap  (cr, m_cap)
-- set line width
cairo_set_line_width (cr,m_width_E)
-- set color and alpha for marks
cairo_set_source_rgba (cr,mr,mg,mb,ma)
-- START LOOP FOR SECOND MARKS
for i=1,number_marks_E do
-- drawing code using the value of i to calculate degrees
-- calculate start point for 12/24 hour mark
radius=m_start_rad
point=(math.pi/180)*((i-1)*(360/number_marks_E))
x=0+radius*(math.sin(point))
y=0-radius*(math.cos(point))
-- set start point for line
cairo_move_to (cr,clock_centerx+x,clock_centery+y)
-- calculate end point for 12/24 hour mark
radius=m_end_rad
point=(math.pi/180)*((i-1)*(360/number_marks_E))
x=0+radius*(math.sin(point))
y=0-radius*(math.cos(point))
-- set path for line
cairo_line_to (cr,clock_centerx+x,clock_centery+y)
-- draw the line
cairo_stroke (cr)
end-- of for loop
--[[ TIME CALCULATIONS CLOCK E
if clock_type_E==12 then
hours=tonumber(os.date("%I"))
-- convert hours to seconds
h_to_s=hours*60*60
elseif clock_type_E==24 then
hours=tonumber(os.date("%H"))
-- convert hours to seconds
h_to_s=hours*60*60
end
minutes=tonumber(os.date("%M"))
-- convert minutes to seconds
m_to_s=minutes*60
-- get current seconds
seconds=tonumber(os.date("%S"))
-- DRAW HOUR HAND
-- get hours minutes seconds as just seconds and draw it
hsecs=h_to_s+m_to_s+seconds
-- calculate degrees for each second
hsec_degs=hsecs*(360/(60*60*clock_type_E))-- use equation ~ eliminate decimals
-- set radius to calculate hand points
radius=hh_length_E
-- set start line coordinates, the center of the circle
cairo_move_to (cr,clock_centerx,clock_centery)
-- calculate coordinates for end of minute hand
point=(math.pi/180)*hsec_degs
x=0+radius*(math.sin(point))
y=0-radius*(math.cos(point))
-- describe the line we will draw
cairo_line_to (cr,clock_centerx+x,clock_centery+y)
-- set up line attributes and draw line
cairo_set_line_width (cr,hh_width_E)
cairo_set_source_rgba (cr,hhr,hhg,hhb,hha)
cairo_set_line_cap  (cr, hh_cap)
cairo_stroke (cr)
-- DRAW MINUTE HAND
-- get minutes and seconds as seconds
msecs=m_to_s+seconds
-- calculate degrees for each second
msec_degs=msecs*0.1
-- set radius to calculate hand points
radius=mh_length_E
-- set start line coordinates, the center of the circle
cairo_move_to (cr,clock_centerx,clock_centery)
-- calculate coordinates for end of minute hand
point=(math.pi/180)*msec_degs
x=0+radius*(math.sin(point))
y=0-radius*(math.cos(point))
-- describe the line we will draw
cairo_line_to (cr,clock_centerx+x,clock_centery+y)
-- set up line attributes and draw line
cairo_set_line_width (cr,mh_width_E)
cairo_set_source_rgba (cr,mhr,mhg,mhb,mha)
cairo_set_line_cap  (cr, mh_cap)
cairo_stroke (cr)
-- DRAW SECOND HAND
-- calculate degrees for each second
sec_degs=seconds*6
-- set radius to calculate hand points
radius=sh_length_E
-- set start line coordinates, the center of the circle
cairo_move_to (cr,clock_centerx,clock_centery)
-- calculate coordinates for end of seconds hand
point=(math.pi/180)*sec_degs
x=0+radius*(math.sin(point))
y=0-radius*(math.cos(point))
-- describe the line we will draw
cairo_line_to (cr,clock_centerx+x,clock_centery+y)
-- set up line attributes
cairo_set_line_width (cr,sh_width_E)
cairo_set_source_rgba (cr,shr,shg,shb,sha)
cairo_set_line_cap  (cr, sh_cap)
cairo_stroke (cr)


-- POSITION FOR TEXT HOUR NUMBERS
local center_x=175
local center_y=260
local radius=45
-- FONT
cairo_select_font_face (cr, "CorporateMonoExtraBold", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 12)
cairo_set_source_rgba (cr,194/255,204/255,255/255,1)	-- (cr,1,1,1,1)
-- TABLE OF TEXT -- in order
--text_days={"12","01","02","03","04","05","06","07","08","09","10","11",}
-- FOR A 12 HOUR CLOCK WITH THE NUMBERS 13-00
text_days={"00","13","14","15","16","17","18","19","20","21","22","23",}
for i=1,12 do
-- OUTTER POINTS POSTION FOR TEXT
local point=(math.pi/180)*((360/12)*(i-1))
local x=0+radius*(math.sin(point))
local y=0-radius*(math.cos(point))
-- CALCULATE CENTRE OF TEXT
local text=text_days[i]--gets text from table
local extents=cairo_text_extents_t:create()
cairo_text_extents(cr,text,extents)
local width=extents.width
local height=extents.height
cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
cairo_show_text (cr, text)
cairo_stroke (cr)
end
-- INNER POINTS POSITION, radius smaller than text circle
local radius=32
for i=1,12 do
local point=(math.pi/180)*((360/12)*(i-1))
local x=0+radius*(math.sin(point))
local y=0-radius*(math.cos(point))
cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
cairo_stroke (cr)
end ]]

-- ### END CLOCK E ########################################




-- ########################################################
-- ### START CLOCK A ######################################
-- SET MARKS ##############################################
-- MARKS AROUND CLOCK A -- Large Main 24 HR Clock
local number_marks_A=24
-- set mark length
local m_length_A=0
-- set mark width
local m_width_A=0
-- set mark line cap type
local m_cap=CAIRO_LINE_CAP_ROUND
-- set mark color and alpha,red blue green alpha
local mr,mg,mb,ma=1,1,1,1-- opaque white
-- SETUP HOUR HANDS #######################################
-- CLOCK A HOUR HAND
-- set length of hour hand
hh_length_A=130
-- set hour hand width
hh_width_A=3
-- set hour hand line cap
hh_cap=CAIRO_LINE_CAP_ROUND
-- set hour hand color
hhr,hhg,hhb,hha=1,1,1,.5-- fully opaque white
-- SETUP MINUTE HANDS #####################################
-- CLOCK A MINUTE HAND SETUP
-- set length of minute hand
mh_length_A=145
-- set minute hand width
mh_width_A=2
-- set minute hand line cap
mh_cap=CAIRO_LINE_CAP_ROUND
-- set minute hand color
mhr,mhg,mhb,mha=1,1,1,.5-- fully opaque white
-- SETUP SECOND HANDS #####################################
-- CLOCK A SECOND HAND SETUP
-- set length of seconds hand
sh_length_A=150
-- set hour hand width
sh_width_A=2
-- set hour hand line cap
sh_cap=CAIRO_LINE_CAP_ROUND
-- set seconds hand color
shr,shg,shb,sha=1,0,0,1-- fully opaque red
-- CLOCK A ###### 12 HR TIME ##############################
-- CLOCK SETTINGS
clock_radius=200
clock_centerx=175
clock_centery=175
-- DRAWING CODE
-- DRAW BORDER
cairo_set_source_rgba (cr,cbr,cbg,cbb,cba)
cairo_set_line_width (cr,clock_border_width)
cairo_arc (cr,clock_centerx,clock_centery,clock_radius,0,2*math.pi)
cairo_stroke (cr)
-- DRAW MARKS
-- stuff that can be moved outside of the loop, needs only be set once
-- calculate end and start radius for marks
m_end_rad=clock_radius-b_to_m
m_start_rad=m_end_rad-m_length_A
-- set line cap type
cairo_set_line_cap  (cr, m_cap)
-- set line width
cairo_set_line_width (cr,m_width_A)
-- set color and alpha for marks
cairo_set_source_rgba (cr,mr,mg,mb,ma)
-- START LOOP FOR HOUR MARKS
for i=1,number_marks_A do
-- drawing code using the value of i to calculate degrees
-- calculate start point for 12/24 hour mark
radius=m_start_rad
point=(math.pi/180)*((i-1)*(360/number_marks_A))
x=0+radius*(math.sin(point))
y=0-radius*(math.cos(point))
-- set start point for line
cairo_move_to (cr,clock_centerx+x,clock_centery+y)
-- calculate end point for 12/24 hour mark
radius=m_end_rad
point=(math.pi/180)*((i-1)*(360/number_marks_A))
x=0+radius*(math.sin(point))
y=0-radius*(math.cos(point))
-- set path for line
cairo_line_to (cr,clock_centerx+x,clock_centery+y)
-- draw the line
cairo_stroke (cr)
end-- of for loop
-- HOUR MARKS
-- TIME CALCULATIONS CLOCK A
if clock_type_A==12 then
hours=tonumber(os.date("%I"))
-- convert hours to seconds
h_to_s=hours*60*60
elseif clock_type_A==24 then
hours=tonumber(os.date("%H"))
-- convert hours to seconds
h_to_s=hours*60*60
end
minutes=tonumber(os.date("%M"))
-- convert minutes to seconds
m_to_s=minutes*60
-- get current seconds
seconds=tonumber(os.date("%S"))
-- DRAW HOUR HAND
-- get hours minutes seconds as just seconds
hsecs=h_to_s+m_to_s+seconds
-- calculate degrees for each second
hsec_degs=hsecs*(360/(60*60*clock_type_A))-- use equation ~ eliminate decimals
-- set radius to calculate hand points
radius=hh_length_A
-- set start line coordinates, the center of the circle
cairo_move_to (cr,clock_centerx,clock_centery)
-- calculate coordinates for end of hour hand
point=(math.pi/180)*hsec_degs
x=0+radius*(math.sin(point))
y=0-radius*(math.cos(point))
-- describe the line we will draw
cairo_line_to (cr,clock_centerx+x,clock_centery+y)
-- set up line attributes and draw line
cairo_set_line_width (cr,hh_width_A)
cairo_set_source_rgba (cr,hhr,hhg,hhb,hha)
cairo_set_line_cap  (cr, hh_cap)
cairo_stroke (cr)
-- DRAW MINUTE HAND
-- get minutes and seconds just as seconds
msecs=m_to_s+seconds
-- calculate degrees for each second
msec_degs=msecs*0.1
-- set radius to calculate hand points
radius=mh_length_A
-- set start line coordinates, the center of the circle
cairo_move_to (cr,clock_centerx,clock_centery)
-- calculate coordinates for end of minute hand
point=(math.pi/180)*msec_degs
x=0+radius*(math.sin(point))
y=0-radius*(math.cos(point))
-- describe the line we will draw
cairo_line_to (cr,clock_centerx+x,clock_centery+y)
-- set up line attributes and draw line
cairo_set_line_width (cr,mh_width_A)
cairo_set_source_rgba (cr,mhr,mhg,mhb,mha)
cairo_set_line_cap  (cr, mh_cap)
cairo_stroke (cr)
-- DRAW SECOND HAND
--[[
-- calculate degrees for each second
sec_degs=seconds*6
-- set radius to calculate hand points
radius=sh_length_A
-- set start line coordinates, the center of the circle
cairo_move_to (cr,clock_centerx,clock_centery)
-- calculate coordinates for end of seconds hand
point=(math.pi/180)*sec_degs
x=0+radius*(math.sin(point))
y=0-radius*(math.cos(point))
-- describe the line we will draw
cairo_line_to (cr,clock_centerx+x,clock_centery+y)
-- set up line attributes
cairo_set_line_width (cr,sh_width_A)
cairo_set_source_rgba (cr,shr,shg,shb,sha)
cairo_set_line_cap  (cr, sh_cap)
cairo_stroke (cr)
]]
-- ####################################################################
-- part of a second hand

--position
local center_x=175
local center_y=175
--get seconds value
local seconds=tonumber(os.date("%S"))
--calculate rotation of second hand in degrees
local arc=(math.pi/180)*((360/60)*seconds)
--calculate point 1
local radius1=140
local x1=0+radius1*math.sin(arc)
local y1=0-radius1*math.cos(arc)
--calculate point 2
local radius2=158
local x2=0+radius2*math.sin(arc)
local y2=0-radius2*math.cos(arc)
--draw line connecting points
cairo_move_to (cr, center_x+x1,center_y+y1)
cairo_line_to (cr, center_x+x2, center_y+y2)
cairo_set_source_rgba (cr,255/255,0/255,0/255,1)
cairo_stroke (cr)
-- ####################################################################

-- POSITION FOR TEXT HOUR NUMBERS
local center_x=175
local center_y=175
local radius=165
-- FONT
cairo_select_font_face (cr, "CorporateMonoExtraBold", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 16)
cairo_set_source_rgba (cr,1,1,1,1) --(cr,194/255,204/255,255/255,1)	-- (cr,1,1,1,1)
-- TABLE OF TEXT -- in order
text_days={"00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23",}
for i=1,24 do
-- OUTTER POINTS POSTION FOR TEXT
local point=(math.pi/180)*((360/24)*(i-1))
local x=0+radius*(math.sin(point))
local y=0-radius*(math.cos(point))
-- CALCULATE CENTRE OF TEXT
local text=text_days[i]--gets text from table
local extents=cairo_text_extents_t:create()
cairo_text_extents(cr,text,extents)
local width=extents.width
local height=extents.height
cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
cairo_show_text (cr, text)
cairo_stroke (cr)
end
-- INNER POINTS POSITION, radius smaller than text circle
local radius=150
for i=1,24 do
local point=(math.pi/180)*((360/24)*(i-1))
local x=0+radius*(math.sin(point))
local y=0-radius*(math.cos(point))
cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
cairo_stroke (cr)
end
--[[ HOUR POINTS CIRCLES,  ##########Uncoment section to draw rings around numbers
local radius=162
for i=1,60 do
local point=(math.pi/180)*((360/12)*(i-1))
local x=0+radius*(math.sin(point))
local y=0-radius*(math.cos(point))
cairo_arc (cr,center_x+x,center_y+y,12,0,2*math.pi)
cairo_stroke (cr)
end]]
-- ### END CLOCK A ########################################



-- ########################################################
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
end-- end main function

and last but not least the conkyForecast template: /media/5/Conky/McBars/scripts/chronograph.weather.template

 Sunrise${goto 290}Sunset
 [--datatype=SR]${goto 300}[--datatype=SS]


${goto 55}Visible${goto 240}Rain?
${goto 55}[--datatype=VI]${goto 240}[--datatype=PC]







${goto 55}High: [--datatype=HT --startday=0]${goto 235}Now: [--datatype=LT --night]
${goto 70}Low: [--datatype=LT --startday=0]${goto 230}FL: [--datatype=LT --night]
${goto 90}Bar: [--datatype=BR]${goto 220}UV: [--datatype=UI]
${goto 120}Humidity: [--datatype=HM]${image [--datatype=MI] -p 150,73 -s 50x50}
 Daylight${goto 140}Dew: [--datatype=DP]${image [--datatype=WI] -p 125,170 -s 100x100 -n}${goto 300}Wind
 [--datatype=DL]${goto 260}[--datatype=WD] @ [--datatype=WS]

Last edited by Sector11 (2012-11-03 23:33:23)


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

Offline

#3573 2012-11-04 01:32:43

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

Re: Conky v1.9 Thread

I hope it is a conky theme inspired by the revolutionary visuals from my number one all time favorite song/video in history!
[video]http://www.youtube.com/watch?v=PJQVlVHsFF8[/video]
*crosses fingers*
oogha chukka

Last edited by mrpeachy (2012-11-04 02:19:16)

Offline

#3574 2012-11-04 03:49:06

techboywii
New Member
Registered: 2012-09-09
Posts: 6

Re: Conky v1.9 Thread

I am kinda new to this forum and #! in general, but here is my Conky config. Hope you like it tongue

# set to yes if you want Conky to be forked in the background
    background yes
    use_xft yes
    xftfont Monospace:size=9
    xftalpha 0.5
    update_interval 0.7
    total_run_times 0
    own_window yes
    own_window_type normal
    own_window_transparent yes
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    double_buffer yes
    minimum_size 250 5
    maximum_width 250
    draw_shades no
    draw_outline no
    draw_borders no
    draw_graph_borders yes
   
    default_color grey
    default_shade_color red
    default_outline_color grey
    alignment top_right
    gap_x 12
    gap_y 20
    no_buffers yes
    uppercase no
    cpu_avg_samples 2
    override_utf8_locale yes

    TEXT
                  ${font Arial Black:size=15}\#!${font}
              ${font Ubuntu:size=7}CrunchBang Linux${font}
    
    
    System ${hr 2}
    Uptime: $alignr $uptime
    CPUTemp: ${alignr}${hwmon 0 temp 1} °C
    CPU: $alignr ${cpu cpu0}%
    ${cpugraph cpu0 ffcc00 ff0000}

    RAM: $mem/$memmax ($memperc% Used)
    ${color 48a0d2}${membar}${color}
    
    Swap: $swap/$swapmax ($swapperc% Used)
    ${color f17f17}${swapbar}${color}
    
    HDD: ${fs_used /}/${fs_size /} (${fs_free_perc /}% Free)
    ${color A1A1A1}${fs_bar /}${color}
    
    WiFi ${hr 2} 
    SSID: ${alignr}${wireless_essid wlan0}
    Internal IP: ${alignr}${addr wlan0}
    External IP: ${alignr}${execi 60 wget -O - http://ip.tupeux.com | tail}

8M925.png

Offline

Help fund CrunchBang, donate to the project!

#3575 2012-11-04 03:52:11

McLovin
#! CrunchBanger
From: my computer chair
Registered: 2009-02-28
Posts: 105
Website

Re: Conky v1.9 Thread

Sector11 wrote:
McLovin wrote:

Lol, no problem.
I got inspired by the center growing bars, and am about to start work on a new one that promises to be epic, a hint, David Hasselhoff would love it.

A Knight Rider Conky?

That is 100% correct, I'm working on the wallpaper for it now, I'm making a complete custom wallpaper to work with it, this is gonna be a long time in progress set-up, but once it's done, it's gonna be one killer conky/desktop, all inclusive, and stupidly silly.

Last edited by McLovin (2012-11-04 03:52:58)


8o Got /? | The first GUI, and "on-line" system was created in 1968 by Douglas Engelbart, the system included modern day innovations such as video conferencing, and on-line file sharing.

Offline

Board footer

Powered by FluxBB

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

Debian Logo