You are not logged in.

#1 2015-11-03 16:38:25

Sector11
Tpyo Knig
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,275

Conky - Calendars / Clocks / Time

A place to show off your conky calendars » with code « ... from the simple "cal | ncal" command  to scripts that do it for you.

I have a {cough cough} few so I'll be adding them slowly over time, but please don't leave me alone here, if you have a unique conky calendar - or a tweaked "John Doe's calendar" pop it in here.

««« A 9 Month Calendar »»»

I posted one in the » Show us your conky thread and nore asked about it.  So let's start at the beginning as I know it.  The original idea was iMBeCil's running down the left side of his screen, with current month in the centre.  So credit goes to him for the multi-month conky calendar and in the long run the starting of this thread.  Well, IMHO the credit goes to iMBeCil and since I'm the one typing this .... tongue

My first tweak, look at that; Minions, and my second tweak.

Anyway to continue ... the 9 month calendar as I use it.  My idea is I do not need it visible all day every day so I removed "undecorated" from own_window_hints and it starts in a frame like other apps.  Start it when I need it and the [x] to close it.
2015_11_03_09_17_45_Scrot11.jpg

  1. first tweak is here,

  2. second tweak can be seen here, image included, and

  3. the one nore asked about to start here: S11_9_month_cal.conky

# conky -q -c /media/5/Conky/S11_9_month_cal.conky &
# pkill -xf "conky -q -c /media/5/Conky/S11_9_month_cal.conky" &
# Original by CrunchBang user: iMBeCil
# http://crunchbang.org/forums/viewtopic.php?pid=368592#p368592

###  Begin Window Settings  ##################################################
own_window yes
own_window_type normal
own_window_transparent no #yes
own_window_hints skip_taskbar,skip_pager
own_window_colour 000000
own_window_class Conky
own_window_title 9 Months

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

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

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

minimum_size 480 0  # w|h
maximum_width 480

gap_x 400	# l|r
gap_y 100	# u|d

alignment tl
####################################################  End Window Settings  ###
###  Font Settings  ##########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont monofur:bold:size=11
# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 1.0

# Force UTF8? requires XFT ###
override_utf8_locale yes

uppercase no
######################################################  End Font Settings  ###
###  Color Settings  #########################################################
draw_shades yes ##yes
default_shade_color 000000
draw_outline no
default_outline_color 000000

default_color 778899 #LightSlateGray
color0 8FBC8F #DarkSeaGreen
color1 778899 #LightSlateGray
color2 F5F5DC #Beige
color3 87CEFA #LightSkyBlue
color4 48D1CC #MediumTurquoise
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 B0E0E6 #PowderBlue
color8 FFD700 #Gold
color9 DC143C #Crimson
#####################################################  End Color Settings  ###
###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 05
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders yes #no
#default_graph_size 15 40
#####################################################  End Borders Secton  ###
###  Miscellaneous Section  ##################################################
# Boolean value, if true, Conky will be forked to background when started.
background yes

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

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

##############################################  End Miscellaneous Section  ###

update_interval 1
TEXT
${font LED_mono:size=90}${alignc}${color5}${time %T}${color}${font}
${hr}
${goto 10}${execpi 900 ncal -bh -m `date +%m` -A-4 -B4 | sed ':a;N;$!ba;s/\n/\n${goto 10}/g'}
${voffset -120}${goto 175}${execpi 900 ncal -bh -m `date +%m` -A-3 -B3 | sed ':a;N;$!ba;s/\n/\n${goto 175}/g'}
${voffset -120}${goto 335}${execpi 900 ncal -bh -m `date +%m` -A-2 -B2 | sed ':a;N;$!ba;s/\n/\n${goto 335}/g'}
${hr}
${goto 10}${execpi 900 ncal -bh -m `date +%m` -A-1 -B1 | sed ':a;N;$!ba;s/\n/\n${goto 10}/g'}
${voffset -120}${goto 170}      ${color5}${time %b %Y}${color}
${goto 175}${if_match "${time %a}" == "Sun"}${color5}Su${color} Mo Tu We Th Fr Sa${else}\
${if_match "${time %a}" == "Mon"}Su ${color5}Mo${color} Tu We Th Fr Sa${else}\
${if_match "${time %a}" == "Tue"}Su Mo ${color5}Tu${color} We Th Fr Sa${else}\
${if_match "${time %a}" == "Wed"}Su Mo Tu ${color5}We${color} Th Fr Sa${else}\
${if_match "${time %a}" == "Thu"}Su Mo Tu We ${color5}Th${color} Fr Sa${else}\
${if_match "${time %a}" == "Fri"}Su Mo Tu We Th ${color5}Fr${color} Sa${else}\
Su Mo Tu We Th Fr ${color5}Sa${color}${endif}${endif}${endif}${endif}${endif}${endif}
${goto 175}${execpi 900 LAR=`date +%-d`; ncal -bh | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color5}&${color}/' | sed ':a;N;$!ba;s/\n/\n${goto 175}/g'}${color}
${voffset -120}${goto 335}${execpi 900 ncal -bh -m `date +%m` -A1 -B-1 | sed ':a;N;$!ba;s/\n/\n${goto 335}/g'}
${hr}
${goto 10}${execpi 900 ncal -bh -m `date +%m` -A2 -B-2 | sed ':a;N;$!ba;s/\n/\n${goto 10}/g'}
${voffset -120}${goto 175}${execpi 900 ncal -bh -m `date +%m` -A3 -B-3 | sed ':a;N;$!ba;s/\n/\n${goto 175}/g'}
${voffset -120}${goto 335}${execpi 900 ncal -bh -m `date +%m` -A4 -B-4 | sed ':a;N;$!ba;s/\n/\n${goto 335}/g'}
${hr}

OpenBox - use your own path:

  • Lable: 9 Months

  • Command: conky -q -c /media/5/Conky/S11_9_month_cal.conky


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: s12 Kernel: 3.16.0-4-amd64 x86_64 (64 bit gcc: 4.8.4)
Desktop: Openbox 3.5.2 dm: (startx) Distro: Debian GNU/Linux 8

Offline

#2 2015-11-03 17:08:56

Temetka
Member
From: Sol System, Western Spiral Arm
Registered: 2015-10-14
Posts: 545

Re: Conky - Calendars / Clocks / Time

Thanks for sharing. I added this to my collection.

Note to anyone running this: You wil need the monofur font from here:

http://www.dafont.com/monofur.font

I extracted the 2 fonts from the .zip file and renamed the first one to monofur.ttf then placed it in my /home/user/fonts folder.

Or you can change the font in the conky to one of your choosing. I suggest comic sans or papyrus.


The meaning of life is to just be alive. It is so plain and so obvious
    and so simple. And yet everybody rushes aroound in a great panic
             as if it were necessary to achieve something beyond themselves.
                                                                                                             - Alan Watts

Offline

#3 2015-11-03 17:33:45

Sector11
Tpyo Knig
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,275

Re: Conky - Calendars / Clocks / Time

You're welcome Temetka.

I didn't rename my monofur font, I use it as it came: monof55.ttf
But you are right, any font can be used as long as it is a mono font (spacing may vary).

xftfont fantasque sans mono:bold:size=11 looks nice:
2015_11_03_14_29_06_Scrot11.jpg <<-old | new --> 2016_06_15_11_13_00_Scrot11.jpg
In fact, I think I'll leave that for a while.  big_smile

TEXT
${font LED_mono:size=90}${goto 15}${color1}88:88:88${goto 15}${color5}${time %T}${color}${font}
${hr}
${goto 10}${execpi 900 ncal -bh -m `date +%m` -A-4 -B4 | sed ':a;N;$!ba;s/\n/\n${goto 10}/g'}
${voffset -120}${goto 175}${execpi 900 ncal -bh -m `date +%m` -A-3 -B3 | sed ':a;N;$!ba;s/\n/\n${goto 175}/g'}
${voffset -120}${goto 335}${execpi 900 ncal -bh -m `date +%m` -A-2 -B2 | sed ':a;N;$!ba;s/\n/\n${goto 335}/g'}
${hr}
${goto 10}${execpi 900 ncal -bh -m `date +%m` -A-1 -B1 | sed ':a;N;$!ba;s/\n/\n${goto 10}/g'}
${voffset -120}${goto 170}      ${color5}${time %b %Y}${color}
${goto 175}${if_match "${time %a}" == "Sun"}${color5}Su${color} Mo Tu We Th Fr Sa${else}\
${if_match "${time %a}" == "Mon"}Su ${color5}Mo${color} Tu We Th Fr Sa${else}\
${if_match "${time %a}" == "Tue"}Su Mo ${color5}Tu${color} We Th Fr Sa${else}\
${if_match "${time %a}" == "Wed"}Su Mo Tu ${color5}We${color} Th Fr Sa${else}\
${if_match "${time %a}" == "Thu"}Su Mo Tu We ${color5}Th${color} Fr Sa${else}\
${if_match "${time %a}" == "Fri"}Su Mo Tu We Th ${color5}Fr${color} Sa${else}\
Su Mo Tu We Th Fr ${color5}Sa${color}${endif}${endif}${endif}${endif}${endif}${endif}
${goto 175}${execpi 900 LAR=`date +%-d`; ncal -bh | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color5}&${color}/' | sed ':a;N;$!ba;s/\n/\n${goto 175}/g'}${color}
${voffset -120}${goto 335}${execpi 900 ncal -bh -m `date +%m` -A1 -B-1 | sed ':a;N;$!ba;s/\n/\n${goto 335}/g'}
${hr}
${goto 10}${execpi 900 ncal -bh -m `date +%m` -A2 -B-2 | sed ':a;N;$!ba;s/\n/\n${goto 10}/g'}
${voffset -120}${goto 175}${execpi 900 ncal -bh -m `date +%m` -A3 -B-3 | sed ':a;N;$!ba;s/\n/\n${goto 175}/g'}
${voffset -120}${goto 335}${execpi 900 ncal -bh -m `date +%m` -A4 -B-4 | sed ':a;N;$!ba;s/\n/\n${goto 335}/g'}
${hr}

BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: s12 Kernel: 3.16.0-4-amd64 x86_64 (64 bit gcc: 4.8.4)
Desktop: Openbox 3.5.2 dm: (startx) Distro: Debian GNU/Linux 8

Offline

#4 2015-11-03 18:46:48

unklar
Member
Registered: 2015-10-31
Posts: 844

Re: Conky - Calendars / Clocks / Time

Very good idea.

I had searched here
unsuccessfully for a user after a 12 months calendar.

El Conkystator hi.gif
is there at 9 more months what possible ...12 wink

Offline

#5 2015-11-03 19:32:02

nobody0
Disabled account
Registered: 2015-09-29
Posts: 664

Re: Conky - Calendars / Clocks / Time

@ Sector11,
Do you remember, there was a conky that worked with letters and numbers, which showed time such as "It is half past nine" or "It is ten to eleven" in the old #! conky threads? I've been trying to find it, but with no luck. Maybe, you have some idea?

Last edited by nobody0 (2015-11-03 19:33:25)

Offline

#6 2015-11-03 20:13:36

nore
>2⁹
From: squirrels' nest
Registered: 2015-09-29
Posts: 440

Re: Conky - Calendars / Clocks / Time

Thanks S11, I'll read it through later this week.

Offline

#7 2015-11-03 20:28:46

Sector11
Tpyo Knig
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,275

Re: Conky - Calendars / Clocks / Time

unklar wrote:

Very good idea.

I had searched here
unsuccessfully for a user after a 12 months calendar.

El Conkystator http://www.en.kolobok.us/smiles/big_standart/hi.gif
is there at 9 more months what possible ...12 wink

Wunderbar!!!!!!!  I see mobilediesels horizontal/vertical calendar in there to an immediately recognized some of my work.  Made my day, danke, for the link!  smile

Any number of months is possible.  12 months would mean no "centre" month so you would have have to select a layout and then determine which month would be the current month.

x x x
x N x
x x x

12 months

x x x x
x N x x
x x x x

or

x x x
x N x
x x x
x x x

or

x x x x x x
x x N x x x

15 months:

x x x x x
x x N x x
x x x x x

11 months where N would be centred (yes it can be done) 5 months in the past and five months in the future

x x x x
x  N X
x x x x

15 months would put one in the centre

x x x x x
x x N x x
x x x x x

OR if your screen is big enough 25 - it would fit on my screen (1920x1080)

x x x x x
x x x x x
x x N x x
x x x x x
x x x x x

BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: s12 Kernel: 3.16.0-4-amd64 x86_64 (64 bit gcc: 4.8.4)
Desktop: Openbox 3.5.2 dm: (startx) Distro: Debian GNU/Linux 8

Offline

#8 2015-11-03 20:45:36

Sector11
Tpyo Knig
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,275

Re: Conky - Calendars / Clocks / Time

ostrolek wrote:

"It is ten to eleven"

Word clock conky - mrpeachy had a LUA script one I think and mobilediesel came up with a bash script that does it.  I have it here some place.  Later tonight or tomorrow I'll start a new thread: Conky - Clocks/Time


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: s12 Kernel: 3.16.0-4-amd64 x86_64 (64 bit gcc: 4.8.4)
Desktop: Openbox 3.5.2 dm: (startx) Distro: Debian GNU/Linux 8

Offline

#9 2015-11-03 20:46:01

Sector11
Tpyo Knig
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,275

Re: Conky - Calendars / Clocks / Time

nore wrote:

Thanks S11, I'll read it through later this week.

No problem.


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: s12 Kernel: 3.16.0-4-amd64 x86_64 (64 bit gcc: 4.8.4)
Desktop: Openbox 3.5.2 dm: (startx) Distro: Debian GNU/Linux 8

Offline

#10 2015-11-03 20:48:54

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: Conky - Calendars / Clocks / Time

ostrolek wrote:

"It is half past nine"

http://conky.pitstop.free.fr/wiki/index … k_%28en%29

That's a BASH script but there is a link to the equivalent .conkyrc


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#11 2015-11-03 21:46:09

nobody0
Disabled account
Registered: 2015-09-29
Posts: 664

Re: Conky - Calendars / Clocks / Time

Head_on_a_Stick wrote:
ostrolek wrote:

"It is half past nine"

http://conky.pitstop.free.fr/wiki/index … k_%28en%29

That's a BASH script but there is a link to the equivalent .conkyrc

Thanks!
I remember it in #! conky forums. I think it was in Statler times.

Offline

#12 2015-11-03 22:33:30

Temetka
Member
From: Sol System, Western Spiral Arm
Registered: 2015-10-14
Posts: 545

Re: Conky - Calendars / Clocks / Time

This thread needs to be stickied. Same with the new one you are going to create. I mention it because if it's not posted to in a while it could drop down in the list and, personally, I hate searching. It was nice on the #! forums to have the conky threads at the top of the scrips sub-forum.

On to my post.

This image:
file.php?id=938&sid=c7549e4a43bd39706a35d7ed0a4d38fb&mode=view

Is a killer clock. I took a look at the scripts, but they appear to be in Russian. Can anyone translate them?

Source thread:
https://forums.mageia.org/de/viewtopic. … 523#p24444

Das Script zur Uhr

clock3.lua.tar.gz
   (4.16 KiB) 1-mal heruntergeladen


Meine conkyrc dazu

Code: Alles auswählen
    # Hintergrund
    background no

    # Schrift
    use_xft yes
    xftfont terminus:size=8
    xftalpha 0.2

    # Aktualisierung und Fenster von Conky
    update_interval 1
    total_run_times 0         #Gesamtzahl der updates bis conky beendet wird; bei 0 laeuft endlos
    own_window yes            #eigenes Fenster
    #own_window_type desktop  #Art des Fenster(normal=Standard,desktop=keine Fensterdekoration,Pager,Sticky auf allen Fenstern)
    own_window_transparent yes
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    own_window_class Conky
    own_window_argb_visual
    #own_window_colour         #wenn kein transparenter Hintergrund > Wahl der Hintergrundfarbe in hexadezimal(zB ffffff)
    #own_window_title          #manuelles setzen des Fensternamen, Standard ist <hostname> -conky

    # Buffers
    double_buffer yes          #bei eigenem Fenster, damit X-Server-Buffer nicht zu gross und kein Flackern auftritt
    no_buffers yes             #damit der Arbeitsspeicher nicht überlaeuft

    # Aktualisierungsfrequenz von Prozessor und Netz
    cpu_avg_samples 2
    net_avg_samples 2

    # Rahmen
    draw_shades no           #Schatten um Text
    draw_outline no
    draw_borders no          #Rahmen um Text
    draw_graph_borders no    #Rahmen um Graphen
    border_inner_margin 0    #Rahmenabstand in Pixeln
    border_outer_margin 0    #dito
    stippled_borders         #Abstaende gestrichelter Rahmen in Pixeln

    # Farben
    default_color white      #Ändern der Standardfarbe bei dunklen Hintergründen
    default_color black      #Ändern der Standardfarbe bei hellen Hintergründen
    #color0 ffffff           #Beispiele
    #color1 b22222


    # Alignment              #Ausrichtung auf dem Bildschirm
    #alignment top_left      #tl
    #alignment top_right     #tr
    #alignment top_middle    #tm
    #alignment bottom_left   #bl
    #alignment bottom_right  #br
    #alignment bottom_middle #bm
    #alignment middle_left   #ml
    #alignment middle_right  #mr
    #alignment middle_middle #mm
    alignment mm


    uppercase no             #Grossbuchstaben
    #use_spacer yes          #nur mit Mono-Schriften, setzt Abstaende, damit das eine Objekt nicht das Andere verschiebt
    text_buffer_size 4096    #
    imlib_cache_size 0

    # Fenstergrösse
    minimum_size 320 320     #minimale Fenstergrösse in Pixeln
    #maximum_width 220       #maximale Breite in Pixeln
    gap_x 110                #Einstellung wenn conky oben
    gap_y 10                 #Einstellung wenn conky unten


    lua_load ~/clock/scripts/clock3.lua
    lua_draw_hook_pre clock

    TEXT
    #Ja, und arbeite hier mal mit offset oder voffset zum platzieren auf dem Desk
    #${time %A}

Nr.9 wie erwähnt vom selben Autor das Prinzp Kalender-Uhr-ein paar PC Daten

KalOl.jpg

die conkyrc

Code: Alles auswählen
    # main conkyrc by Boris Krinkel <olgmen>
    # krinkel@rambler.ru
    # --- параметры окна ---
    # эти строки необходимы для нормальной работы лучше не изменять
    own_window      yes
    own_window_class   Conky
    own_window_transparent   yes
    own_window_type      desktop
    own_window_argb_visual yes
    own_window_hints   undecorated,below,sticky,skip_taskbar,skip_pager
    # следующие параметры можно изменять
    # минимальный размер
    minimum_size 350 0
    # минимальная ширина
    maximum_width 400
    # --- расположение окна
    # левый верхний угол экрана
    #alignment top_left
    # левый нижний угол экрана
    #alignment bottom_left
    # правый верхний угол экрана
    alignment top_right
    # правый нижний угол экрана
    #alignment bottom_right
    # расстояние между кромкой экрана и окном
    # по горизонтали
    gap_x 300
    # по вертикали
    gap_y 20

    # --- графика окна ---
    # если желаете выводить conky на другом фоне напишите yes
    background no
    # окантовка окна, бордюр
    draw_borders no
    # если бордюр yes
    # длина штрихов бордюра, если 0, то бордюр выводится сплошной линией
    stippled_borders 1
    # толщина линий бордюра
    border_width 1
    # бордюр вокруг выводимых графиков
    draw_graph_borders no
    # включить тень?
    draw_shades no
    # окантовка вокруг текста и выводимых объектов
    draw_outline no
    # Добавить пробел?  Только для встраиваемых объектов
    use_spacer right

    # --- цвет ---
    # основной цвет по умолчанию
    default_color 151515    #DeepSkyBlue
    # цвет тени
    default_shade_color black
    # цвет окантовки
    default_outline_color black
    # дополнительные
    color1 white
    color2 yellow
    color3 red

    # --- шрифты ---
    # используемые шрифты X когда Xft не используется, можно выбрать один из следующих
    #font 5x7
    #font 6x10
    #font 7x13
    #font 8x13
    #font 9x15
    #font *mintsmild.se*
    #font -*-*-*-*-*-*-34-*-*-*-*-*-*-*

    # Используется ли Xft?
    use_xft yes

    # Шриф Xft когда Xft доступен, здесь можно ввести название и размер любого шрифта
    xftfont Archangelsk:size=9

    # яркость шрифта при испоьзовании шрифтов Xft
    xftalpha 0.5
    # выводить весь текст прописными буквами
    uppercase no
    # использовать кодировку UTF8? ПРИМЕЧАНИЕ: требуется Xft
    override_utf8_locale yes

    # --- следующие данные необходимы для работы
    # обновление в секундах не имеет смысла ставить больше 2
    # при выводе времени в секундах необходимо значение 1 и менее
    update_interval 0.5
    # время работы программы до её выключения
    # установите 0 для работы программы без остановки
    total_run_times 0
    # двойная буфферизация (требуется для flicker, может не работать)
    double_buffer yes
    # вычитать буферизацию файловой системы из используемой памяти?
    no_buffers yes
    # количество cpu
    cpu_avg_samples 2
    # number of net samples to average
    net_avg_samples 2
    imlib_cache_size 0
    short_units yes
    pad_percents 2
    text_buffer_size 2048
    imlib_cache_size 0
    #--- LUA ---
    lua_load ~/clock/calendar/calendar3.lua
    lua_draw_hook_pre widgets
    TEXT
    ${voffset 700}

das original Archiv

calendar.tar.gz
    (10.44 KiB) 2-mal heruntergeladen


The meaning of life is to just be alive. It is so plain and so obvious
    and so simple. And yet everybody rushes aroound in a great panic
             as if it were necessary to achieve something beyond themselves.
                                                                                                             - Alan Watts

Offline

#13 2015-11-04 09:37:49

unklar
Member
Registered: 2015-10-31
Posts: 844

Re: Conky - Calendars / Clocks / Time

What do you want to have translated it?

The Russian text is the explanation of the meaning of the parameters. Exactly how that is true in English or German for Conky configuration files.

Mir has used only logical thinking and Google Translator.  wink

Edit: Number 9 is your clock (!)

clock3.lua.tar.gz
is not Your chosen clock

Last edited by unklar (2015-11-04 13:47:58)

Offline

#14 2015-11-04 09:44:48

unklar
Member
Registered: 2015-10-31
Posts: 844

Re: Conky - Calendars / Clocks / Time

Sector11 wrote:

Any number of months is possible.  12 months would mean no "centre" month so you would have have to select a layout and then determine which month would be the current month.

Wow!
At this mathematical deliberation I had not thought.  smile

Offline

#15 2015-11-05 18:58:57

nore
>2⁹
From: squirrels' nest
Registered: 2015-09-29
Posts: 440

Re: Conky - Calendars / Clocks / Time

2-month version, built on BL-Def-Cal with 9-month twist.

###  Window Settings
own_window yes
own_window_type desktop
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager,sticky
own_window_colour 000000
own_window_class Conky
own_window_title Calendar

minimum_size 200 0  ### width | height
maximum_width 200

alignment tl ### tl = top left
gap_x 540	### left | right
gap_y 100	### up | down

###  Font Settings
use_xft yes
xftfont Droid Sans Mono:bold:size=12
xftalpha 1
override_utf8_locale yes
uppercase no

###  Colour Settings
draw_shades no #yes
default_shade_color 000000

draw_outline no # amplifies text if yes
default_outline_color 000000

default_color cccccc
color0 aaaaaa 
color1 999999 
color2 eeeeee 
color3 666666

###  Borders Section
draw_borders no
stippled_borders 5
border_inner_margin 5
border_outer_margin 0
border_width 2
draw_graph_borders yes

###  Miscellaneous Section
background yes
use_spacer none
text_buffer_size 6144
no_buffers yes
short_units yes
pad_percents 2
imlib_cache_size 0
double_buffer yes

update_interval 1

TEXT
${font Cuprum: size=48}${color0}${goto 60}${time %H}${voffset -10}${goto 120}${font Cuprum: size=32}${color0}${time %M}${font Droid Sans Mono: size=14}${color1}${voffset 10}
${alignc}${time %A}
${alignc}${time %d.%m.%Y}
${alignc}vko ${time %V}${color1}${font}${voffset 40}

${color1}${execpi 1800 LAR=`date +%-d`; ncal -wbhM| sed -e 's/\<'$LAR'\>/${color2}&${color1}/' | sed ':a;N;$!ba;s/\n/\n/g'}

${color3}${execpi 900 ncal -bh -m `date +%m` -A1 -B-1 | sed ':a;N;$!ba;s/\n/\n/g'}${color}${font}

2015_11_05_204431_1280x800_scrot.png

edit: past tense

Last edited by nore (2015-11-06 04:12:08)

Offline

#16 2015-11-05 21:08:23

Sector11
Tpyo Knig
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,275

Re: Conky - Calendars / Clocks / Time

Temetka wrote:

Is a killer clock. I took a look at the scripts, but they appear to be in Russian. Can anyone translate them?

Look very much like Wlourf's Calendar Wheel  Unfortunately one must register and be logged in to Ubuntu to get the tar.gz file.  sad

calendar.tar.gz
    (10.44 KiB) 2-mal heruntergeladen

calendar.txt reads:

# Text file format
#MMDD; N; TEXT
#MMDD = Month day
#N = 0 or 1 (1 celebrates this day as the color of the weekend)
#TEXT = Output of text (use * to transfer the words to the next line)

0101, 1, New Year's Eve
0107; 1; Christmas
0114, 0, Old New Year
0119, 0, Epiphany
0125, 0, Tatiana's Day
0207, 0, Mardi Gras
0214, 0, Valentine's Day
0220, 0, Just checking

according to an online translator ...

Yup - wlourf!
calendar3.lua starts with:

- [[
When assembling the script used data from the following scripts

Conky Widgets by londonali1010 (2009) - watches and rings
Conky vertical bar graph by iggykoopa - horizontal and vertical bars
Shadowed clock by wlourf (10 jan. 2010) - the clock with shadow
calendar wheel by Wlourf (14 jan. 2010) - Calendar

He collected all this Boris Krinkel <olgmen> krinkel@rambler.ru

To do this requires seripta CONKY version 1.7.2

To call this script in Conky, insert the following lines to the TEXT (provided that the script is stored in ~ / scripts / conky_widgets.lua):
     lua_load ~ / scripts / calendar3.lua
     lua_draw_hook_pre widgets
]]

BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: s12 Kernel: 3.16.0-4-amd64 x86_64 (64 bit gcc: 4.8.4)
Desktop: Openbox 3.5.2 dm: (startx) Distro: Debian GNU/Linux 8

Offline

#17 2015-11-05 21:20:48

Sector11
Tpyo Knig
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,275

Re: Conky - Calendars / Clocks / Time

Nice one nore! Looks like it belongs on that wallpaper.


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: s12 Kernel: 3.16.0-4-amd64 x86_64 (64 bit gcc: 4.8.4)
Desktop: Openbox 3.5.2 dm: (startx) Distro: Debian GNU/Linux 8

Offline

#18 2015-11-08 07:39:42

nore
>2⁹
From: squirrels' nest
Registered: 2015-09-29
Posts: 440

Re: Conky - Calendars / Clocks / Time

I'm trying to get my head around adding week numbers in the two month calendar.

ncal -w

writes week numbers to the last line, but in

ncal -wb

weeks are abandoned.
I'm almost sure I've seen somewhere a bash script, that transposes the awkward vertical calendar. I went through my archives but couldn't find it.

Offline

#19 2015-11-08 09:27:26

mrneilypops
The BL Scrot.Moe Guy
From: luxembourg
Registered: 2015-09-30
Posts: 542
Website

Re: Conky - Calendars / Clocks / Time

binclock cool

a binary clock - top right in the image

Screenshot_2015_11_08_10_29_15.jpg

Last edited by mrneilypops (2015-11-08 09:30:05)

Offline

#20 2015-11-08 10:52:47

Temetka
Member
From: Sol System, Western Spiral Arm
Registered: 2015-10-14
Posts: 545

Re: Conky - Calendars / Clocks / Time

I like your binary clock. Would you mind posting the full conky? I'd like to see how you integrated it.

Thanks.


The meaning of life is to just be alive. It is so plain and so obvious
    and so simple. And yet everybody rushes aroound in a great panic
             as if it were necessary to achieve something beyond themselves.
                                                                                                             - Alan Watts

Offline

#21 2015-11-08 14:33:31

mrneilypops
The BL Scrot.Moe Guy
From: luxembourg
Registered: 2015-09-30
Posts: 542
Website

Re: Conky - Calendars / Clocks / Time

@Temetka
Sure  wink

# For commands above TEXT check:
# http://conky.sourceforge.net/config_settings.html
#
# For commands available below TEXT check:
# http://conky.sourceforge.net/variables.html

# Bunsen Labs Conky help threads
# http://crunchbang.org/forums/viewtopic.php?pid=371424#p371424

# beta tested by: smacz
# Enjoy! :)

# pkill -xf "conky -q -c $HOME/.config/conky/BL-Default.conkyrc" &
###  Begin Window Settings  #####################
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager,sticky
own_window_colour 000000
own_window_class Conky
own_window_title bunsenlabs sdi+liq

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

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

minimum_size 220 0  ### width | height
maximum_width 300

gap_x 20	### left | right
gap_y 45	### up | down

alignment tr
#######################  End Window Settings  ###
###  Font Settings  #############################
# Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont bitcora:size=8
#ftfont Liberation Sans:size=9

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

uppercase no
#########################  End Font Settings  ###
###  Colour Settings  ###########################
draw_shades no #yes
default_shade_color 000000

draw_outline no # amplifies text if yes
default_outline_color 000000

#default_color 656667 # Waldorf original colour
#default_color 7a7a7a # Flame  & Bunsen Grey
#default_color 929292 # Labs Grey
default_color C0C0C0 # Silver
color0 B0E0E6 # PowderBlue
color1 778899 # LightSlateGray
color2 D8BFD8 # Thistle
color3 9ACD32 # YellowGreen
color4 FFA07A # LightSalmon
color5 FFDEAD # NavajoWhite
color6 00BFFF # DeepSkyBlue
color7 5F9EA0 # CadetBlue
color8 BDB76B # DarkKhaki
color9 CD5C5C # IndianRed
#######################  End Colour Settings  ###
###  Borders Section  ###########################
draw_borders no
# Stippled borders?
stippled_borders 5
# border margins
border_inner_margin 5
border_outer_margin 0
# border width
border_width 2
# graph borders
draw_graph_borders yes #no
#default_graph_size 15 40
#######################  End Borders Section  ###
###  Miscellaneous Section  #####################
# Boolean value, if true, Conky will be forked to background when started.
background yes

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

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

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

# change GiB to G and MiB to M
short_units yes

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

# Imlib2 image cache size, in bytes. Default 4MiB Increase this value if you use
# $image lots. Set to 0 to disable the image cache.
imlib_cache_size 0

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

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

# Desired output unit of all objects displaying a temperature. Parameters are
# either "fahrenheit" or "celsius". The default unit is degree Celsius.
# temperature_unit Fahrenheit
##############################################
#  Output
##############################################
TEXT
b u n s e n l a b s   I N F O  $alignr${execp ~/binclock}
${hr}
GMT:$alignr${utime %H:%M}
Host:$alignr$nodename
Uptime:$alignr$uptime

ram:$alignr$mem/$memmax
#Swap usage:$alignr$swap/$swapmax
disk:$alignr${fs_used /}/${fs_size /}
cpu:$alignr${cpu cpu0}%

debian :$alignr${execp cat /etc/debian_version} 
kernel installed : $alignr${kernel}
kernel latest check:$alignr${exec ~/bin/atomfeed.py}
#i3 :$alignr${execp apt-cache policy i3 | grep Installed: | cut -d: -f2}

s h o r t c u t    K E Y S
${hr}
[Alt] + F2${alignr}Run Dialog
[Alt] + F3${alignr}Alt Menu
[Super] + Space${alignr}Main Menu
[Super] + Tab${alignr}Client Menu
[Super] + t${alignr}Terminal
[Super] + f${alignr}File Manager
[Super] + e${alignr}Editor
[Super] + m${alignr}Media Player
[Super] + w${alignr}Web Browser
[Super] + h${alignr}Task Manager
[Super] + l${alignr}Lock Screen
[Super] + v${alignr}Volume Control
[Super] + x${alignr}Logout
[PrtSc]${alignr}Screenshot
${hr}
s i m p l i c i t y   IS THE ULTIMTE SOPHISTICATION
$alignr${font bitcora13:italic:size=6}Leanardo da Vinci

Offline

#22 2015-11-08 18:16:19

Sector11
Tpyo Knig
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,275

Re: Conky - Calendars / Clocks / Time

nore wrote:

I'm trying to get my head around adding week numbers in the two month calendar.

the old 'cal' app never had the -w option.  So whern you use 'ncal -b' to get the horizontal layout you loose the ncal options that cal didn't have.

     cal [-3hjy] [-A number] [-B number] [[month] year]
     cal [-3hj] [-A number] [-B number] -m month [year]
     ncal [-3bhjJpwySM] [-A number] [-B number] [-s country_code] [[month] year]
     ncal [-3bhJeoSM] [-A number] [-B number] [year]
     ncal [-CN] [-H yyyy-mm-dd] [-d yyyy-mm]

I've checked all my 'calendar' scripts I can't find anything here that does what you want.  sad


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: s12 Kernel: 3.16.0-4-amd64 x86_64 (64 bit gcc: 4.8.4)
Desktop: Openbox 3.5.2 dm: (startx) Distro: Debian GNU/Linux 8

Offline

#23 2015-11-08 18:46:14

ceeslans
Member
Registered: 2015-09-30
Posts: 26

Re: Conky - Calendars / Clocks / Time

Temetka wrote:

<snip>
...
On to my post.

This image:
https://forums.mageia.org/de/download/f … &mode=view

Is a killer clock. I took a look at the scripts, but they appear to be in Russian. Can anyone translate them?

Source thread:
https://forums.mageia.org/de/viewtopic. … 523#p24444

have this conky running on my desktop; but somehow the fading future days in the top seem to break out of the conky area:
conky_calendar3.jpg

and I don't know how to set this correctly, either in conkyrc or in the lua file.
was kinda hoping that any of you could have a look where i have gone astray...

conkyrc:

update_interval 1 
#total_run_times 0
double_buffer yes 
no_buffers yes 
cpu_avg_samples 2
net_avg_samples 2 
imlib_cache_size 0 
short_units yes 
pad_percents 2 
text_buffer_size 2048 
imlib_cache_size 0 

background no 
own_window yes
own_window_type desktop
own_window_argb_visual yes
own_window_argb_value 0
own_window_hints undecorated,sticky,skip_taskbar,skip_pager,below
own_window_title Calendar3
own_window_class Calendar3

draw_borders no
#stippled_borders 1
border_width 1
draw_graph_borders no
draw_shades no
draw_outline no 
use_spacer right 

default_color 151515 	#DeepSkyBlue
default_shade_color black 
default_outline_color black
color1 white
color2 yellow 
color3 red 

use_xft yes 
xftfont Sans:pixelsize=9 
xftalpha 0.5 
uppercase no 
override_utf8_locale yes 

minimum_size 350 450
alignment mr 
gap_x 20 
gap_y 20 

#--- LUA ---
lua_load ~/.conky/calendar3/calendar3.lua
lua_draw_hook_pre widgets

TEXT
#

calendar3.lua:

--[[
When assembling the script used data from the following scripts

Conky Widgets by londonali1010 ( 2009) - watches and rings
Conky vertical bar graph by iggykoopa - horizontal and vertical bars
Shadowed clock by wlourf ( 10 jan. 2010 ) - the clock with shadow
calendar wheel by Wlourf ( 14 jan. 2010 ) - Calendar

He collected all this Boris Krinkel <olgmen> krinkel@rambler.ru

To do this requires seripta CONKY version 1.7.2

To call this script in Conky , insert the following lines to the TEXT ( provided that the script is saved in ~/scripts/conky_widgets.lua):
    lua_load ~/scripts/calendar3.lua
    lua_draw_hook_pre widgets
]]

require 'cairo'
require 'imlib2'

--[[ AIR CLOCK WIDGET ]]
--[[ Widget displays the image of the clock with arrows and shadow volume of the arrows .
Some of the settings stored in the widget
]]

function clock(cr, x, y, s, bgc, bga, fgc, fga)

-- color conversion function

	function rgb_to_r_g_b(colour,alpha)
		return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
	end

-- We assign a thickness of output lines

		local s_th = 2

-- draw a face

		local radius = s/2	
		local m_x,m_y = x + s/2, y + s/2
		cairo_set_line_width(cr,6)
		cairo_arc(cr, m_x,m_y, radius, 0, math.rad(360))
		cairo_set_source_rgba(cr,rgb_to_r_g_b(bgc,bga))
		cairo_fill_preserve(cr)
		cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga))
		cairo_stroke(cr)

-- transparent " body clock"
	
		cairo_arc(cr, m_x, m_y, radius*1.25, 0, 2*math.pi)
		cairo_set_source_rgba(cr, 0.5, 0.5, 0.5, 0.8)
		cairo_set_line_width(cr,1)
		cairo_stroke(cr)
	
		local border_pat=cairo_pattern_create_linear(m_x, m_y - radius*1.25, m_x, m_y + radius*1)
	
		cairo_pattern_add_color_stop_rgba(border_pat,0,0,0,0,0.7)
		cairo_pattern_add_color_stop_rgba(border_pat,0.3,1,1,1,0)
		cairo_pattern_add_color_stop_rgba(border_pat,0.5,1,1,1,0)
		cairo_pattern_add_color_stop_rgba(border_pat,0.7,1,1,1,0)
		cairo_pattern_add_color_stop_rgba(border_pat,1,0,0,0,0.7)
		cairo_set_source(cr,border_pat)
		cairo_arc(cr, m_x, m_y, radius*1.125, 0, 2*math.pi)
		cairo_close_path(cr)
		cairo_set_line_width(cr, radius*0.25)
		cairo_stroke(cr)

-- the output time division

		local i = 0
		local winkel = math.rad(30)		
		
		for i=0,11,1 do
		cairo_set_line_width(cr,s_th*1.5)
--		cairo_move_to(cr, m_x-math.sin(winkel*i)*(radius*1.3), m_y-math.cos(winkel*i)*(radius*1.3))
cairo_move_to(cr, m_x-math.sin(winkel*i)*radius, m_y-math.cos(winkel*i)*radius)
		cairo_line_to(cr, m_x-math.sin(winkel*i)*(radius*0.9), m_y-math.cos(winkel*i)*(radius*0.9))
		cairo_fill_preserve(cr)
		cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga))
		cairo_stroke(cr)
		end

-- minute withdrawal of divisions

		local i = 0
		local winkel = math.rad(6)

		for i=0,59,1 do
		cairo_set_line_width(cr,1)
		cairo_move_to(cr, m_x-math.sin(winkel*i)*radius, m_y-math.cos(winkel*i)*radius)
		cairo_line_to(cr, m_x-math.sin(winkel*i)*(radius*0.9), m_y-math.cos(winkel*i)*(radius*0.9))
		cairo_stroke(cr)
		end

-- Draw division 3 , 6, 9 and 12 hours

		cairo_set_line_width(cr,s_th/2)		-- set line thickness

		cairo_move_to (cr, x + 0.15*s, y + 0.5*s)
		cairo_line_to (cr, x + 0.45*s, y + 0.5*s)
		cairo_move_to (cr, x + 0.55*s, y + 0.5*s)
		cairo_line_to (cr, x + 0.85*s, y + 0.5*s)
		cairo_move_to (cr, x + 0.5*s, y + 0.15*s)
		cairo_line_to (cr, x + 0.5*s, y + 0.45*s)
		cairo_move_to (cr, x + 0.5*s, y + 0.55*s)
		cairo_line_to (cr, x + 0.5*s, y + 0.85*s)
		cairo_stroke(cr)

-- clockwise from the shadow comes from Shadowed clock by wlourf ( 10 jan. 2010 )

		function draw_hand(a_trame,arc,arc0,arc1,lg,r,border,rgb)
		xx = xc + clock_r*math.sin(arc)*lg
		yy = yc - clock_r*math.cos(arc)*lg
		x0 = xc + r*math.sin(arc0)
		y0 = yc - r*math.cos(arc0)
		x1 = xc + r*math.sin(arc1)
		y1 = yc - r*math.cos(arc1)

		if border ~= nil then
		cairo_set_line_width(cr,1)
		cairo_set_source_rgba(cr,border[1],border[2],border[3],0.5)
		cairo_move_to (cr, x0, y0)
		cairo_curve_to (cr, x0, y0, xx, yy, x1, y1)
		cairo_arc(cr,xc,yc,r,arc1-math.pi/2,arc0-math.pi/2)
		cairo_stroke(cr)
		end

-- draw shadow

		cairo_move_to (cr, x0, y0)
		cairo_curve_to (cr, x0, y0, xx+shadow_xoffset, yy+shadow_yoffset, x1, y1)
		cairo_arc(cr,xc,yc,r,arc1-math.pi/2,arc0-math.pi/2)
		pat = cairo_pattern_create_radial (xc, yc, 0, xc, yc, clock_r)
		cairo_pattern_add_color_stop_rgba (pat, 0, 0, 0, 0, shadow_opacity)
		cairo_pattern_add_color_stop_rgba (pat, 1, 0, 0, 0, 0)
		cairo_set_source (cr, pat)
		cairo_fill (cr)

-- draw arrows

		cairo_move_to (cr, x0, y0)
		cairo_curve_to (cr, x0, y0, xx, yy, x1, y1)
		cairo_arc(cr,xc,yc,r,arc1-math.pi/2,arc0-math.pi/2)
		pat = cairo_pattern_create_radial (xc, yc, clock_r/10, xc, yc, clock_r*lg)
		cairo_pattern_add_color_stop_rgba (pat,0, rgb[1], rgb[2], rgb[3], 1)
		cairo_pattern_add_color_stop_rgba (pat, 1, 0, 0, 0, 1)
		cairo_set_source (cr, pat)
		cairo_fill (cr)
		cairo_pattern_destroy (pat)
		end

-- Here, we introduce the basic data

-- The radius of hours in pixels , specify the diameter of the half hour

		clock_r=s/2

-- coordinates of the center hours

		xc = x+s/2
		yc = y+s/2

-- coordinates of the center of the light hours, 0 - the light source above the center
-- may be positive , the light source above the center or negative

		shadow_xoffset=70
		shadow_yoffset=70

-- transparent shadow, values from 0 to 1

		shadow_opacity=0.5

-- Per second hand , yes - true, no - false.
-- In the derivation of the second hand in update_interval .conkyrc should be less than 1 sec .

		show_seconds=true

-- Per axis arrows in the center of the clock , yes - true, no - false.

		show_dot = true

-- the size of the arrows , the width of the first digit , the second - the length

		rh,lgh=3,1.2	-- hour hand
		rm,lgm=2,1.75	-- minute hand
		rs,lgs=1,1.9	-- second hand

-- We pick up the data from the OS

		local hours=os.date("%I")
		local mins=os.date("%M")
		local secs=os.date("%S")

-- calculation of the angle of movement of arrows

		gamma = math.pi/2-math.atan(rs/(clock_r*lgs))
		secs_arc=(2*math.pi/60)*secs
		secs_arc0=secs_arc-gamma
		secs_arc1=secs_arc+gamma

		gamma = math.pi/2-math.atan(rm/(clock_r*lgm))
		mins_arc=(2*math.pi/60)*mins + secs_arc/60
		mins_arc0=mins_arc-gamma
		mins_arc1=mins_arc+gamma

		gamma = math.pi/2-math.atan(rh/(clock_r*lgh))
		hours_arc=(2*math.pi/12)*hours+mins_arc/12
		hours_arc0=hours_arc-gamma
		hours_arc1=hours_arc+gamma

-- concluded arrows

		draw_hand(alpha_trame,hours_arc,hours_arc0,hours_arc1,lgh,rh,{0,0,0},{1,1,1})
		draw_hand(alpha_trame,mins_arc,mins_arc0,mins_arc1,lgm,rm,{0,0,0},{.9,.9,.9})
		if show_seconds then
		draw_hand(alpha_trame,secs_arc,secs_arc0,secs_arc1,lgs,rs,{0,0,0},{.8,.8,.8})
		end

-- Draw arrows axis

		if show_dot then

		lg_shadow_center=3
		radius=math.min(rh,rm,rs)*0.75
		if radius<1 then radius=1 end
		ang = math.atan(shadow_yoffset/shadow_xoffset)

-- the shadow of the axis

		gamma = -math.atan(1/lg_shadow_center)
		ang0=ang-gamma
		ang1=ang+gamma

-- the shadow of the arrows

		if shadow_xoffset<0 and shadow_yoffset>0 then
		ang0=ang0+math.pi
		ang1=ang1+math.pi
		ang=ang+math.pi
		end

		if shadow_yoffset<0 and shadow_xoffset>0 then
		ang0=ang0-math.pi/2
		ang1=ang1-math.pi/2
		ang=ang-math.pi/2
		end

		if shadow_yoffset<0 and shadow_xoffset<0 then
		ang0=ang0-math.pi/2
		ang1=ang1-math.pi/2
		ang=ang-math.pi/2
		end

		x0 = xc + radius*math.sin(ang0)
		y0 = yc - radius*math.cos(ang0)
		xx = xc + radius*math.sin(ang+math.pi/2)*lg_shadow_center
		yy = yc - radius*math.cos(ang+math.pi/2)*lg_shadow_center
		x1 = xc - radius*math.sin(ang1)
		y1 = yc + radius*math.cos(ang1)

		cairo_move_to(cr,x0,y0)
		cairo_curve_to(cr,x0,y0,xx,yy,x1,y1)
		pat = cairo_pattern_create_radial (xc, yc, 0, xc, yc, radius*4)
		cairo_pattern_add_color_stop_rgba (pat, 0, 0, 0,0, shadow_opacity)
		cairo_pattern_add_color_stop_rgba (pat, 1, 0,0,0, 0)
		cairo_set_source (cr, pat)
		cairo_fill (cr)

		ang = ang-math.pi/2
		xshad = xc + radius*math.sin(ang)*.5
		yshad = yc - radius*math.cos(ang)*.5

		local ds_pat=cairo_pattern_create_radial(xc, yc, 0, xshad, yshad, radius)
		cairo_pattern_add_color_stop_rgba(ds_pat,0,.9,.9,.9,1)
		cairo_pattern_add_color_stop_rgba(ds_pat,1,0,0,0,1)
		cairo_arc(cr,xc,yc,radius,0,2*math.pi)
		cairo_set_source(cr,ds_pat)
		cairo_fill(cr)

-- gloss paint on glass

		pat = cairo_pattern_create_radial (115.2, 102.4, 25.6, 102.4, 102.4, 128)
		cairo_pattern_add_color_stop_rgba (pat, 0, 1, 1, 1, 0.1)
		cairo_pattern_add_color_stop_rgba (pat, 1, 0, 0, 0, 0.4)
		cairo_set_source (cr, pat)
		cairo_arc (cr, xc, yc, s/2, 0, 2 * math.pi)
		cairo_fill (cr)
		cairo_pattern_destroy (pat)
end

--[[ END AIR CLOCK WIDGET ]]

-- ----------------------------------------------------------------------------------

--[[
calendar wheel by Wlourf (14 jan. 2010)

This script is designed to draw dates on a circular way on the left of the screen.
Some text info can be added in the circle with the file calendar.txt (see below)
Some parameters (colors, sizes ... ) can be adjusted (see below).

As this script draw a png file only if necessary, a short update of the conky can be used.

Call this script in Conky using the following before TEXT (assuming you save this script to ~/scripts/calendar.lua):
	lua_load ~/scripts/calendar.lua
	lua_draw_hook_pre main
	
	
v1.0 - 14 jan. 2010 - Original release
v1.1 - 19 jan. 2010 - Calendar are now drawn in an PNG file and this file 
	is called at every conky call, when day change, a new PNG file is created.
	- An x offset can be added to "Today's block"
	- An y offset can be added too to "Today's block"
v1.2 - 28 jan. 2010 - Calendar can be drawn on the right side of the conky (but without text info)
	- Calendar is drawn after the second conky refresh only
v1.2a - 29 jan. 2010 - Minor update, picture was refresh every second instead of every day!
]]

--require 'cairo'
--require 'imlib2'

-------------------------- parameters (part one) are set here -----------------------------------

	--text file calendar (absolute path, can be "" if no file used)
	calendar_file=""
	--format of in this text file
	--MMDD;N;TEXT
	--MMDD = month day
	--N    = 0 or 1 (1 to display same colors as week-ends)
	--TEXT = Text to display (use * for multiline)

	--some paths to images created (absolutes paths)
	image_tmp="/tmp/img_tmp.png" --used to rotate a single date
	image_calendar="/tmp/conky-calendar3-arc.png"
	image_dates="/tmp/conky-calendar3-dates.png"

	--more parameters below
-------------------------- end of parameters (part one) -----------------------------------	


function string:split(delimiter)
--source for the split function : http://www.wellho.net/resources/ex.php4?item=u108/split
  local result = { }
  local from  = 1
  local delim_from, delim_to = string.find( self, delimiter, from  )
  while delim_from do
    table.insert( result, string.sub( self, from , delim_from-1 ) )
    from  = delim_to + 1
    delim_from, delim_to = string.find( self, delimiter, from  )
  end
  table.insert( result, string.sub( self, from  ) )
  return result
end



function conky_draw_calendar()
--	if conky_window==nil then return end
	local width=conky_window.width
	local height=conky_window.height
--local height = s
--local width = s	
	--sometimes, there is problem with init and width & height are set to 0 or 2 !!
--	if width<3 or height<3 then return end
	
local cs=cairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, height)
	local cr=cairo_create(cs)
	
	-------------------------- parameters (part two) are set here -----------------------------------

	
	-- vertical center of the circle (height/2 for centered circle)
	local yc=s/2+y
	
	--number of days to display before and after today (i.e. with range = 30 --> 60 days are displayed)
	--even number between 20 and 30 for nice effect
	local range = 11
	
	--not sure of the english words so I leave then in french !	
	--fleche (arrow) is the segment from x=0 to x=radius-xc (with xc =center of the circle) 
	--fleche for the external circle
	--fleche2 for the internal circle
	--fleche2 must be < fleche
	local fleche=125
	local fleche2=fleche*.85
	
	--corde (chord) is the vertical segment (where x=0) of the external circle
	local corde = 1.5*s--height+s/2
			
	--colors RGB (0-255)
	--week day
	local wday={150,150,150}
	--week-end and bank holidays defined in calendar.txt
	local eday={255,200,0}
	--color of today
	local dday={255,255,255}
	
	--vertical gradient (both circle and dates)? (true/false)
	local vgradient=true
	
	--horizontal gradient for the circle? (0 to 1, 0 is the best choice for "moon like" circle )
	local hgradient=0
	
	--you can change the font here
	local font="PT Sans"
	--font_size (of dates) must be less than delta (= heigth of a day)
	local delta = yc/(range+0.5)
	--the font-size has to be adjusted depending on the font used
	local font_size=delta-1
	
	--information text (from calendar.txt)
	local info_color={255,200,0}
	--font size of text infos
	local font_size_info=font_size

	--today_xoffset is the offset for the date of today (can be positive/null/negative, in pixels)
	local today_xoffset=3
	
	--today_yoffset where today will be displayed (value between -range to + range)?
	-- 0 = center of the arc
	-- -range =  top of the arc
	-- +range = bottom of the arc
	local today_yoffset=0	-- -9
	
	--display on right side of the screen (true/false)
	local align_right = true

	
	-------------------------- end of the parameters, ouf -----------------------------------

	--some calculations
	--radius for external circle
	--radius2 for internal circle
	--delta = number of arcs in the circle
	local radius=(corde^2+4*fleche^2)/(8*fleche)
	local radius2=(corde^2+4*fleche2^2)/(8*fleche2)
 	local decal=2*(delta-font_size)
	wday[1]=wday[1]/255
	wday[2]=wday[2]/255
	wday[3]=wday[3]/255	
	eday[1]=eday[1]/255
	eday[2]=eday[2]/255
	eday[3]=eday[3]/255	

	--xc =x center of external circle
	--xc2=x center of internal circle
	local xc = fleche - radius	
	local xc2 = fleche2 - radius2
	
	if align_right then 
		xc = width-xc-1.25*s/2
		xc2 = width-xc2-1.25*s/2
	end

	local h_txt = height/(2*range+1)
	
	local t = os.date('*t') -- date in table
	--get the date
	local s = os.time(t) -- date in seconds

	--read the calendar file
	local file = io.open(calendar_file,"r")	
	local tabcal={}	
	local idx=1
	local line,lineok="",""
	if file ~= nil then
		while true do
		 	line = file:read("*l")
		    if line == nil then break end
			lineok = string.split(line,";")
			if (#lineok)==3 then
				tabcal[idx]={lineok[1],lineok[2],lineok[3]}
				idx=idx+1
			end
		end
	end	
	io.close()
	local angmini=math.atan((corde/2)/(radius-fleche))

	local imageDates=imlib_create_image(width,height)
	imlib_context_set_image(imageDates)
	imlib_image_set_has_alpha(1)
	imlib_save_image(image_dates)

	for i=-range,range do
		local s2 = s + 3600*24*(i-today_yoffset) --date diff in seconds

		local wd = os.date("%w",s2)
		local md = os.date("%m%d",s2)
		local dt = os.date("%a. %d %b.",s2),os.date("%d",s2),os.date("%b",s2)

		--percentage of vertical gradient
		local pc = (range-math.abs(i))/range
		if not vgradient then pc=1 end

		--angle min et max of one block
		local ang0 = angmini*(i-0.5)/range
		local ang1 = angmini*(i+0.5)/range
		if align_right then 
			ang0=math.pi-ang0
			ang1=math.pi-ang1
		end
		local angm = (ang0+ang1)/2
		
		--read the calendar.txt array
		local flag = false
		for idy=1,idx-1 do
			if tabcal[idy][1] == md then
				if (i-today_yoffset) == 0 then
					today = tabcal[idy]
				end
				if tabcal[idy][2] == "1" then
					flag = true
				end
				break
			end
		end

		--colors
		local colR,colG,colB=0,0,0
		if wd=="6" or wd=="0" or flag == true then
			colR,colG,colB=eday[1],eday[2],eday[3]
		else
			colR,colG,colB=wday[1],wday[2],wday[3]
		end
		
		--offset of today 
		local offset_x=0
		local way = 1
		if (i-today_yoffset)==0 then 
			if align_right then way =-1 end
			offset_x=today_xoffset*way 
		end

		local pat = cairo_pattern_create_radial (xc+offset_x, yc, radius,
         			xc2+offset_x,yc,radius2);
		
		cairo_pattern_add_color_stop_rgba (pat, 0, colR, colG, colB, pc);
		cairo_pattern_add_color_stop_rgba (pat, 1, colR, colG, colB, hgradient);
		
		cairo_set_source (cr, pat);
		--draw the portion of arc
		if align_right then
			x1,y1=radius*math.cos(ang0)+xc+offset_x,(radius-offset_x)*math.sin(ang0)+yc
			x2,y2=radius*math.cos(ang1)+xc+offset_x,(radius-offset_x)*math.sin(ang1)+yc
		else
			x1,y1=radius*math.cos(ang0)+xc+offset_x,(radius+offset_x)*math.sin(ang0)+yc
			x2,y2=radius*math.cos(ang1)+xc+offset_x,(radius+offset_x)*math.sin(ang1)+yc
		end
		cairo_move_to(cr,x1,y1)
		cairo_line_to(cr,x2,y2)
		cairo_line_to(cr,xc,yc)
		cairo_fill(cr)
		
		--for tests
		if (i-today_yoffset)==0 then
		--cairo_set_source_rgba (cr,1, 0,0,1);
		--cairo_arc(cr,x1,y1,1,0,2*math.pi)
		--cairo_stroke(cr)
		--cairo_arc(cr,xc,yc,radius,0,2*math.pi)
		--cairo_stroke(cr)
		--cairo_set_source_rgba (cr,0, 1, 0,pc);
		--cairo_arc(cr,x2,y2,1,0,2*math.pi)
		--cairo_stroke(cr)
		end

		--write text info if needed, for left-side calendar only
		local have=""
local height = 100 -- расположение текста из calendar.txt

if today ~= nil then
--		if (today ~= nil) and (align_right ~= true) then
			cairo_select_font_face(cr, font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL)
			cairo_set_line_width(cr,0)
			cairo_set_font_size(cr,font_size_info)
			cairo_set_source_rgba (cr, info_color[1]/255, info_color[2]/255, info_color[3]/255,1);

			have = string.split(today[3],"*")
			for i=1,#have do 
				cairo_move_to(cr,10,height+(i-#have/2)*font_size_info)
				cairo_show_text(cr, have[i])
				cairo_fill(cr)
			end
		end	

		--lenght of the arc
		local dx,dy=math.abs(x2-x1),math.abs(y2-y1)
		local h_txt=math.sqrt(dx*dx+dy*dy)
		local w_txt=font_size*10

		--write text in another image for working (rotate) on it
		--didn't find to work in memory only
		local cs2=cairo_image_surface_create(CAIRO_FORMAT_ARGB32, w_txt, h_txt)
		local cr2=cairo_create(cs2)
		cairo_set_font_size (cr2, font_size);
		if (i-today_yoffset)==0 then 
			colR, colG, colB = dday[1]/255,dday[2]/255,dday[3]/255
			pc=1
		end
		cairo_select_font_face(cr2, font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL)

		--write ONE date in ONE picture		
		local txt_date = " " .. dt .. " "
		--start the drawing date here in order to get the lenght of the text
		--for right alignement
		cairo_move_to(cr2,0,h_txt-decal)--+offset_x*math.atan(ang0))
		cairo_set_source_rgba (cr2, colR, colG, colB,pc)
		cairo_show_text(cr2, txt_date)

		if align_right then
			local xmax,ymax=cairo_get_current_point(cr2,0,0)
			--don't use local for cs2fit cause local will be just for if .. end section
			--and then surface will not be deleted --> memory leak
			cs2fit = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, xmax, h_txt)
			cr2fit = cairo_create(cs2fit)
			
			cairo_set_font_size (cr2fit, font_size);
			cairo_select_font_face(cr2fit, font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL)
			cairo_move_to(cr2fit,0,h_txt -decal)
			cairo_set_source_rgba (cr2fit, colR, colG, colB,pc)
			cairo_show_text(cr2fit, txt_date)
			cairo_stroke(cr2fit)
			cairo_surface_write_to_png(cs2fit,image_tmp)
			
		else
			cairo_stroke(cr2)
			cairo_surface_write_to_png(cs2,image_tmp)
		end
	
		--blend date image on cairo surface
		local imageTmp = imlib_load_image(image_tmp)
		imlib_context_set_image(imageTmp)

		if align_right then
			rot_img = imlib_create_rotated_image(angm+math.pi)
		else
			rot_img = imlib_create_rotated_image(angm)
		end

		imlib_context_set_image(imageTmp)
		imlib_free_image()
	
		--image is now a  square
		imlib_context_set_image(rot_img)
		local w_img0, h_img0 = imlib_image_get_width(), imlib_image_get_height()
		
		---look for center of text
		local rt=radius+w_img0/2
		if align_right then	
			rt=rt-offset_x
		else
			rt=rt+offset_x
		end
		local xt=rt*math.cos(angm)+xc-w_img0/2
		local yt=rt*math.sin(angm)+yc-h_img0/2

		imlib_context_set_image(imageDates)
		imlib_blend_image_onto_image(rot_img, 1, 0, 0, w_img0, h_img0, xt,yt, w_img0, h_img0)
		imageDates=imlib_context_get_image()
		imlib_context_set_image(rot_img)
		imlib_free_image()




		if align_right then 
			
			cairo_destroy(cr2fit)
			cairo_surface_destroy(cs2fit)
		end
	
		cairo_destroy(cr2)
		cairo_surface_destroy(cs2)

		cairo_pattern_destroy(pat)
	end --of loop

	--write to disk images with dates only
	imlib_context_set_image(imageDates)
	imlib_save_image(image_dates)	

	--write to disk image with arc only
	cairo_surface_write_to_png(cs,image_calendar)
	
	--make final image
	local imageCal = imlib_load_image(image_calendar)
	imlib_context_set_image(imageCal)
	imlib_blend_image_onto_image(imageDates, 1, 0, 0, width, height, 0,0, width, height)
	
	imlib_save_image(image_calendar)
	imlib_free_image()

	imlib_context_set_image(imageDates)
	imlib_free_image()

	--free memory
	cairo_destroy(cr)
	cairo_surface_destroy(cs)
	
end 
-- ------------------------------------------------------------------------------------------

function calendar()
	--last_date is global 
	local actual_date  = os.date("%Y%m%d") --os.date("%Y%m%d")
	local actual_cal = imlib_load_image(image_calendar)
	if (conky_parse('${updates}')+0) <2  then return end
	if  last_date ~= actual_date or actual_cal == nil then
		--print (os.date("%H%M%S"),'new picture')
		conky_draw_calendar()
		last_date = actual_date
	else
		--print (os.date("%H%M%S"),'use old picture')
	end
	if actual_cal == nil then
		actual_cal = imlib_load_image(image_calendar)
	end
	imlib_context_set_image(actual_cal)
	imlib_render_image_on_drawable(0,0)
	imlib_free_image()
	end
end
-- [[ END CALENDAR WIDGET ]]

-- ------------------------------------------------------------------------------------
function rgb_to_r_g_b(colour,alpha)
  return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end

--[[ BACKGROUND WIDGET by londonali1010 (2009)]]
function background(cr)
  local w=conky_window.width
  local h=conky_window.height
-- "corner_r" is the radius, in pixels, of the rounded corners. If you don't want rounded corners, use 0.
  local corner_r=45
-- Set the colour of your background.
  local bg_colour=0x000000
-- Set the transparency (alpha) of your background.
  local bg_alpha=0.3

  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
--[[ END BACKGROUND WIDGET ]]
-- ----------------------------------------------------------------------
--[[ TEXT WIDGET ]]

	function addzero100(num)

		if tonumber(num) <10 then
		return "00" .. num
		elseif tonumber(num) <100 then
		return "0" .. num
		else
		return num
		end
	end

	function string:split(delimiter)

		local result = { }
		local from  = 1
		local delim_from, delim_to = string.find( self, delimiter, from  )
		while delim_from do
		table.insert( result, string.sub( self, from , delim_from-1 ) )
		from  = delim_to + 1
		delim_from, delim_to = string.find( self, delimiter, from  )
		end
		table.insert( result, string.sub( self, from  ) )
		return result
	end

	function circlewriting(cr, text, font, fsize, radi, horiz, verti, tred, tgreen, tblue, talpha, start, finish, var1)

		local inum=string.len(text)
		range=finish
		deg=(finish-start)/(inum-1)
		degrads=1*(math.pi/180)
		local textcut=string.gsub(text, ".", "%1@@@")
		texttable=string.split(textcut, "@@@")
		for i = 1,inum do
			ival=i
			interval=(degrads*(start+(deg*(i-1))))+var1
			interval2=degrads*(start+(deg*(i-1)))
			txs=0+radi*(math.sin(interval))
			tys=0-radi*(math.cos(interval))
			cairo_select_font_face (cr, font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
			cairo_set_font_size (cr, fsize);
			cairo_set_source_rgba (cr, tred, tgreen, tblue, talpha);
			cairo_move_to (cr, txs+horiz, tys+verti);
			cairo_rotate (cr, interval2)
			cairo_show_text (cr, (texttable[i]))
			cairo_rotate (cr, -interval2)
		end
	end

	function circlewritingdown(cr, text, font, fsize, radi, horiz, verti, tred, tgreen, tblue, talpha, start, finish, var1)

		local inum=string.len(text)
		deg=(start-finish)/(inum-1)
		degrads=1*(math.pi/180)
		local textcut=string.gsub(text, ".", "%1@@@")
		texttable=string.split(textcut, "@@@")
		for i = 1,inum do
			ival=i
			interval=(degrads*(start-(deg*(i-1))))+var1
			interval2=degrads*(start-(deg*(i-1)))
			txs=0+radi*(math.sin(interval))
			tys=0-radi*(math.cos(interval))
			cairo_select_font_face (cr, font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
			cairo_set_font_size (cr, fsize);
			cairo_set_source_rgba (cr, tred, tgreen, tblue, talpha);
			cairo_move_to (cr, txs+horiz, tys+verti);
			cairo_rotate (cr, interval2+(180*math.pi/180))
			cairo_show_text (cr, (texttable[i]))
			cairo_rotate (cr, -interval2-(180*math.pi/180))
		end
	end

	function conky_draw_text()

		local updates=conky_parse('${updates}')
		update_num=tonumber(updates)
		if update_num > 5 then
			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)



--circlewriting variable
cpu=tonumber(conky_parse('${cpu}'))
--text must be in quotes
text=("CPU " .. (addzero100(cpu)) .. "%") 
--font name must be in quotes
font="PT Sans"
fontsize=11
radius=82
positionx=255
positiony=215
colorred=1
colorgreen=0.7
colorblue=0
coloralpha=1
--to set start and finish values for circlewriting, if the text will cross 0 degrees then you must calculate for 360+finish degrees
--eg if you want to go from 270 to 90, then you will input 270 to 450.  Finish has to be greater than start.
start=280
finish=350
letterposition=0
circlewriting(cr, text, font, fontsize, radius, positionx, positiony, colorred, colorgreen, colorblue, coloralpha, start, finish, letterposition)

--circlewritingdown variables
mem=tonumber(conky_parse('${memperc}'))
--text must be in quotes
text=("MEMORY " .. (addzero100(mem)) .. "%")
--font name must be in quotes
font="PT Sans"
fontsize=11
radius=82
positionx=255
positiony=215
colorred=1
colorgreen=0.7
colorblue=0
coloralpha=1
--to set start and finish values for circlewritingdown, if the text will cross 0 degrees then you must calculate for 0-finish degrees
--eg if you want to go from 90 to 270, then you will input 90 to -90.  Start has to be greater than finish
start=10
finish=80
letterposition=0
circlewriting(cr, text, font, fontsize, radius, positionx, positiony, colorred, colorgreen, colorblue, coloralpha, start, finish, letterposition)

--circlewritingdown variable
hdd=tonumber(conky_parse('${fs_used_perc /}'))
--text must be in quotes
text=("FILESYS " .. (addzero100(hdd)) .. "%") 
--font name must be in quotes
font="PT Sans"
fontsize=11
radius=90
positionx=255
positiony=215
colorred=1
colorgreen=0.7
colorblue=0
coloralpha=1
--to set start and finish values for circlewritingdown, if the text will cross 0 degrees then you must calculate for 0-finish degrees
--eg if you want to go from 90 to 270, then you will input 90 to -90.  Start has to be greater than finish
start=260
finish=190
letterposition=0.06
circlewritingdown(cr, text, font, fontsize, radius, positionx, positiony, colorred, colorgreen, colorblue, coloralpha, start, finish, letterposition)

--circlewriting variables
swap=tonumber(conky_parse('${swapperc}'))
--text must be in quotes
text=("SWAP " .. (addzero100(swap)) .. "% ") 
--font name must be in quotes
font="PT Sans"
fontsize=11
radius=90
positionx=255
positiony=215
colorred=1
colorgreen=0.7
colorblue=0
coloralpha=1
--to set start and finish values for circlewriting, if the text will cross 0 degrees then you must calculate for 360+finish degrees
--eg if you want to go from 270 to 90, then you will input 270 to 450.  Finish has to be greater than start.
start=170
finish=100
letterposition=0
circlewritingdown(cr, text, font, fontsize, radius, positionx, positiony, colorred, colorgreen, colorblue, coloralpha, start, finish, letterposition)


		end
	end
--[[ END TEXT WIDGET ]]
-- -------------------------------------------------------------------------------------
	function conky_widgets()
		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)
     background(cr)
    cairo_destroy(cr)
-- -----------------------------------------------------------------------------------
--[[ Вывод часов ]]
  
	cr = cairo_create(cs)
	clock(cr, 180, 140, 150, 0xffffff, 1, 0x606070, 1)
	cairo_destroy(cr)
-- ---------------------------------------------------------------------------------

	cr = cairo_create(cs)
	calendar()
	cairo_destroy(cr)


-- -------------------------------------------------------------------
	cr = cairo_create(cs)
	conky_draw_text()
	cairo_destroy(cr)

end

appreciate any feedback on this
thanks

Offline

#24 2015-11-08 19:16:42

hhh
That's it!
Registered: 2015-09-17
Posts: 7,470
Website

Re: Conky - Calendars / Clocks / Time

^Wow. I have almost zero interest in conky, but that is a great looking calendar/clock. I'll look into this.

Offline

#25 2015-11-08 19:18:05

ceeslans
Member
Registered: 2015-09-30
Posts: 26

Re: Conky - Calendars / Clocks / Time

and forgot one more quirk:
reading complaint in terminal that:

Conky: llua_do_call: function conky_widgets execution failed: /home/cees/.conky/calendar3/calendar3.lua:762: attempt to compare nil with number
Conky: llua_do_call: function conky_widgets execution failed: /home/cees/.conky/calendar3/calendar3.lua:762: attempt to compare nil with number

and for the life of me, can't find what's wrong in line 762
...

Offline

Board footer

Powered by FluxBB