You are not logged in.

#26 2015-11-08 19:30:47

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

Re: Conky - Calendars / Clocks / Time

I'm sorry, what packages exactly are required to run that circular clock?

Offline

#27 2015-11-08 19:55:55

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

Re: Conky - Calendars / Clocks / Time

hhh wrote:

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

edit:
issue with the fonts being cut off is solved.
just needed to change the xftfont in conkyrc to a narrower font:

xftfont Source Sans Pro:pixelsize=11

also like it better with complete transparent background:

(line 739+740 in lua script)
-- Set the transparency (alpha) of your background.
  local bg_alpha=0.0

and all looking good now smile
conky_calendar3_1.jpg

still leaves the quirk in lua line 762 ... which only happens upon creation of the widget, so no biggie at all
grtz

Offline

#28 2015-11-08 19:58:17

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

Re: Conky - Calendars / Clocks / Time

hhh wrote:

I'm sorry, what packages exactly are required to run that circular clock?

I believe it requires cairo and imlib2 ??

Offline

#29 2015-11-08 20:06:29

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

Re: Conky - Calendars / Clocks / Time

Yes, it says that in the files, but there is no package named just 'cairo' in jessie, which is why I said 'exactly'
https://packages.debian.org/search?keywords=cairo

Like I said, I've no real interest in this but it would be helpful for others who do. Anyway, glad you got it solved.

Offline

#30 2015-11-08 20:33:23

damo
....moderator....
Registered: 2015-08-20
Posts: 4,833

Re: Conky - Calendars / Clocks / Time

Probably `libcairo2`


Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#31 2015-11-08 21:32:02

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

Re: Conky - Calendars / Clocks / Time

What you need is the two files found in post #23
2015_11_08_18_29_56_Scrot11.jpg
libcairo2 if I'm not mistaken is already a part of Bunsen.


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

#32 2015-11-09 05:18:34

nore
>2⁹
From: blueberry bush
Registered: 2015-09-29
Posts: 434

Re: Conky - Calendars / Clocks / Time

Sector11 wrote:

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

I suspected that, thanks for checking. I'm sure it's possible to transpose the last line of cal -w with some sed magic, but I'll try to dig for that later.

Offline

#33 2015-11-09 11:48:59

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

Re: Conky - Calendars / Clocks / Time

@nore

Check out gcal

-- -- -- -- -- -- -- -- --
${goto 70}${color5}${time %T}
${goto 27}${color}SU MO ${color5}${time %b %Y}${color} FR SA CW
${goto 20}${color1}${execpi 1800 LAR=`date +%-d`; gcal -K | sed '1d' | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color5}&${color1}/' | sed ':a;N;$!ba;s/\n/\n${goto 20}/g'}${color}
-- -- -- -- -- -- -- -- --

2015_11_09_08_27_23_Scrot11.png
I can't figure out next month though and spacing is a bit different with gcal.


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

#34 2015-11-10 14:40:49

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

Re: Conky - Calendars / Clocks / Time

MOD EDIT:  These conky configs are for Conky v1.10 - based on LUA

Many thanks @iMBeCil and @Sector11!

The calendar really liked. smile
calender.th.jpg
die conkys:
Imbcilconkyrc

conky.config = {
	alignment = 'top_left',
	background = false,
	border_width = 0,
--cpu_avg_samples           5
--default_color             white
--default_color             F38536
	default_color = '#707070',
	default_outline_color = 'white',
	draw_borders = false,
	draw_graph_borders = false,
	draw_outline = false,
	draw_shades = false,
	use_xft = true,
--xftfont                   Terminus:size=10
	font = 'DejaVu Sans Mono:size=9',
	xftalpha = 1,
        gap_x = 5,
	gap_y = 0,
--minimum_size              20 0
	minimum_width = 10, minimum_height = 0,
	maximum_width = 1680,
	net_avg_samples = 2,
	no_buffers = true,
	out_to_console = false,
	own_window = true,
	own_window_class = 'Conky',
	own_window_type = 'override',
	own_window_transparent = true,
--own_window_hints          undecorated,below,sticky,skip_taskbar,skip_pager
	update_interval = 30,
	uppercase = false,
	use_spacer = 'left',
	use_spacer = 'right',
	double_buffer = true,
	short_units = true,
	pad_percents = 0,
--text_buffer_size          512   # default 256

};

conky.text = [[
${color}${exec cal -m `date +%m` -A-2 -B2}
${exec cal -m `date +%m` -A-1 -B1}
${color #93470F}${execp cal | sed s/`echo "\x5f\x08\(.\)\x5f\x08\(.\)"`/'${color #FFA500}\1\2${color #93470F}'/}
${color}${exec cal -m `date +%m` -A1 -B-1}
${exec cal -m `date +%m` -A2 -B-2}
${exec cal -m `date +%m` -A3 -B-3}
${exec cal -m `date +%m` -A4 -B-4}
${exec cal -m `date +%m` -A5 -B-5} 
]];

s11_12_month_cal.conky

conky.config = {
-- by El Conkystador - Sector11
-- conky -q -c ~/S11/s11_12_month_cal.conky &
-- pkill -xf "conky -q -c /home/unklar/S11/s11_12_month_cal.conky" &
-- Original by CrunchBang user: iMBeCil
-- http://crunchbang.org/forums/viewtopic.php?pid=368623#p368623

--##  Begin Window Settings  ##################################################
	own_window = true,
	own_window_type = 'override',
	own_window_transparent = false,--yes
	own_window_hints = 'undecorated,below,skip_taskbar,skip_pager',
	own_window_colour = '#707070',
	own_window_class = 'Conky',
--own_window_title = '12 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 = true,

--## 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 = true,

--## 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_width = 10, minimum_height = 0,-- w|h
	maximum_width = 1680,

	gap_x = 250,-- l|r
	gap_y = 5,-- u|d

	alignment = 'top_left',
--###################################################  End Window Settings  ###
--##  Font Settings  ##########################################################
-- Use Xft (anti-aliased font and stuff)
	use_xft = true,
	font = 'DejaVu Sans Mono:size=7',
-- Alpha of Xft font. Must be a value at or between 1 and 0 ###
	xftalpha = 1.0,

-- Force UTF8? requires XFT ###
	override_utf8_locale = true,

	uppercase = false,
--#####################################################  End Font Settings  ###
--##  Color Settings  #########################################################
	draw_shades = true,--#yes
	default_shade_color = '#000000',
	draw_outline = false,
	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 = false,
-- 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 = true,--no
--default_graph_size 15 40
--####################################################  End Borders Secton  ###
--##  Miscellaneous Section  ##################################################
-- Boolean value, if true, Conky will be forked to background when started.
	background = true,

-- 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 = true,

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

	update_interval = 1,
};

conky.text = [[
${if_match "${time %b}" == "Jan"}${goto 15}SU MO ${color5}${time %b %Y}${color} FR SA
${goto 15}${color3}${execpi 86400 LAR=`date +%-d`; ncal -bh | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color5}&${color3}/' | sed ':a;N;$!ba;s/\n/\n${goto 15}/g'}${color}${else}${goto 10}SU MO ${color5}Jan ${time %Y}${color} FR SA
${goto 10}${color3}${execpi 86400 ncal -bh -m1 | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color5}&${color3}/' | sed ':a;N;$!ba;s/\n/\n${goto 10}/g'}${color}${endif}
${alignc}${membar 0,50}
${if_match "${time %b}" == "Feb"}${goto 10}SU MO ${color5}${time %b %Y}${color} FR SA
${goto 10}${color3}${execpi 86400 LAR=`date +%-d`; ncal -bh | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color5}&${color3}/' | sed ':a;N;$!ba;s/\n/\n${goto 10}/g'}${color}${else}${goto 10}SU MO ${color5}Feb ${time %Y}${color} FR SA
${goto 10}${color3}${execpi 86400 ncal -bh -m2 | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color5}&${color3}/' | sed ':a;N;$!ba;s/\n/\n${goto 10}/g'}${color}${endif}
${alignc}${membar 0,50}
${if_match "${time %b}" == "Mar"}${goto 10}SU MO ${color5}${time %b %Y}${color} FR SA
${goto 10}${color3}${execpi 86400 LAR=`date +%-d`; ncal -bh | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color5}&${color3}/' | sed ':a;N;$!ba;s/\n/\n${goto 10}/g'}${color}${else}${goto 10}SU MO ${color5}Mar ${time %Y}${color} FR SA
${goto 10}${color3}${execpi 86400 ncal -bh -m3 | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color5}&${color3}/' | sed ':a;N;$!ba;s/\n/\n${goto 10}/g'}${color}${endif}
${alignc}${membar 0,50}
${if_match "${time %b}" == "Apr"}${goto 10}SU MO ${color5}${time %b %Y}${color} FR SA
${goto 10}${color3}${execpi 86400 LAR=`date +%-d`; ncal -bh | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color5}&${color3}/' | sed ':a;N;$!ba;s/\n/\n${goto 10}/g'}${color}${else}${goto 10}SU MO ${color5}Apr ${time %Y}${color} FR SA
${goto 10}${color3}${execpi 86400 ncal -bh -m4 | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color5}&${color3}/' | sed ':a;N;$!ba;s/\n/\n${goto 10}/g'}${color}${endif}
${alignc}${membar 0,50}
${if_match "${time %b}" == "May"}${goto 10}SU MO ${color5}${time %b %Y}${color} FR SA
${goto 10}${color3}${execpi 86400 LAR=`date +%-d`; ncal -bh | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color5}&${color3}/' | sed ':a;N;$!ba;s/\n/\n${goto 10}/g'}${color}${else}${goto 10}SU MO ${color5}May ${time %Y}${color} FR SA
${goto 10}${color3}${execpi 86400 ncal -bh -m5 | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color5}&${color3}/' | sed ':a;N;$!ba;s/\n/\n${goto 10}/g'}${color}${endif}
${alignc}${membar 0,50}
${if_match "${time %b}" == "Jun"}${goto 10}SU MO ${color5}${time %b %Y}${color} FR SA
${goto 10}${color3}${execpi 86400 LAR=`date +%-d`; ncal -bh | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color5}&${color3}/' | sed ':a;N;$!ba;s/\n/\n${goto 10}/g'}${color}${else}${goto 10}SU MO ${color5}Jun ${time %Y}${color} FR SA
${goto 10}${color3}${execpi 86400 ncal -bh -m6 | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color5}&${color3}/' | sed ':a;N;$!ba;s/\n/\n${goto 10}/g'}${color}${endif}
${alignc}${membar 0,50}
${if_match "${time %b}" == "Jul"}${goto 10}SU MO ${color5}${time %b %Y}${color} FR SA
${goto 10}${color3}${execpi 86400 LAR=`date +%-d`; ncal -bh | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color5}&${color3}/' | sed ':a;N;$!ba;s/\n/\n${goto 10}/g'}${color}${else}${goto 10}SU MO ${color5}Jul ${time %Y}${color} FR SA
${goto 10}${color3}${execpi 86400 ncal -bh -m7 | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color5}&${color3}/' | sed ':a;N;$!ba;s/\n/\n${goto 10}/g'}${color}${endif}
${alignc}${membar 0,50}
${if_match "${time %b}" == "Aug"}${goto 10}SU MO ${color5}${time %b %Y}${color} FR SA
${goto 10}${color3}${execpi 86400 LAR=`date +%-d`; ncal -bh | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color5}&${color3}/' | sed ':a;N;$!ba;s/\n/\n${goto 10}/g'}${color}${else}${goto 10}SU MO ${color5}Aug ${time %Y}${color} FR SA
${goto 10}${color3}${execpi 86400 ncal -bh -m8 | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color5}&${color3}/' | sed ':a;N;$!ba;s/\n/\n${goto 10}/g'}${color}${endif}
${alignc}${membar 0,50}
${if_match "${time %b}" == "Sep"}${goto 10}SU MO ${color5}${time %b %Y}${color} FR SA
${goto 10}${color3}${execpi 86400 LAR=`date +%-d`; ncal -bh | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color5}&${color3}/' | sed ':a;N;$!ba;s/\n/\n${goto 10}/g'}${color}${else}${goto 10}SU MO ${color5}Sep ${time %Y}${color} FR SA
${goto 10}${color3}${execpi 86400 ncal -bh -m9 | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color5}&${color3}/' | sed ':a;N;$!ba;s/\n/\n${goto 10}/g'}${color}${endif}
${alignc}${membar 0,50}
${if_match "${time %b}" == "Oct"}${goto 10}SU MO ${color5}${time %b %Y}${color} FR SA
${goto 10}${color3}${execpi 86400 LAR=`date +%-d`; ncal -bh | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color5}&${color3}/' | sed ':a;N;$!ba;s/\n/\n${goto 10}/g'}${color}${else}${goto 10}SU MO ${color5}Oct ${time %Y}${color} FR SA
${goto 10}${color3}${execpi 86400 ncal -bh -m10 | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color5}&${color3}/' | sed ':a;N;$!ba;s/\n/\n${goto 10}/g'}${color}${endif}
${alignc}${membar 0,50}
${if_match "${time %b}" == "Nov"}${goto 10}SU MO ${color5}${time %b %Y}${color} FR SA
${goto 10}${color3}${execpi 86400 LAR=`date +%-d`; ncal -bh | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color5}&${color3}/' | sed ':a;N;$!ba;s/\n/\n${goto 10}/g'}${color}${else}${goto 10}SU MO ${color5}Nov ${time %Y}${color} FR SA
${goto 10}${color3}${execpi 86400 ncal -bh -m11 | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color5}&${color3}/' | sed ':a;N;$!ba;s/\n/\n${goto 10}/g'}${color}${endif}
${alignc}${membar 0,50}
${if_match "${time %b}" == "Dec"}${goto 10}SU MO ${color5}${time %b %Y}${color} FR SA
${goto 10}${color3}${execpi 86400 LAR=`date +%-d`; ncal -bh | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color5}&${color3}/' | sed ':a;N;$!ba;s/\n/\n${goto 10}/g'}${color}${else}${goto 10}SU MO ${color5}Dec ${time %Y}${color} FR SA
${goto 10}${color3}${execpi 86400 ncal -bh -m12 | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color5}&${color3}/' | sed ':a;N;$!ba;s/\n/\n${goto 10}/g'}${color}${endif}
${alignc}${membar 0,50}]];

Last edited by unklar (2016-06-07 20:00:33)

Offline

#35 2015-11-10 15:53:15

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

Re: Conky - Calendars / Clocks / Time

@ unklar

WUNDERBAR!

EDIT:  One OOPS!  It is not mine, as you show in the 12 Month calendar: iMBeCil

Original by CrunchBang user: iMBeCil

Credit where credit due.

Last edited by Sector11 (2015-11-10 20:14:17)


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

#36 2015-11-14 06:15:46

nore
>2⁹
From: blueberry bush
Registered: 2015-09-29
Posts: 434

Re: Conky - Calendars / Clocks / Time

Sector11 wrote:

Check out gcal

I found a script that takes a step towards solution:
http://unix.stackexchange.com/questions … cal-or-cal
See last post. At first it looks all right, but the week numbers it displays are off by one. I'll settle down without weeks for now, as long as current week is easy to display.

I tried gcal too, it's exhaustive but it is not going stay in my toolbox.

Offline

#37 2015-11-14 16:06:29

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

Re: Conky - Calendars / Clocks / Time

@ nore

«« Conky v1.9 »»

I installed and removed various "calendar" programs over the years.  n/cal is the best IMHO.

At that link you provided there is a line that caught my attention - and with a bit of tweaking:

 14 Nov 15 | 10:39:16 ~
    $ ncal -w | tail -1 | awk '{print $1" "$2" "$3" "$4" "$5" "$6}'
44 45 46 47 48 
 
 14 Nov 15 | 10:39:24 ~
    $ ncal -w | tail -1 | awk '{print $1"\n"$2"\n"$3"\n"$4"\n"$5"\n"$6}'
44
45
46
47
48

 
 14 Nov 15 | 10:40:06 ~
    $ ncal -w | tail -1 | awk '{print "  "$1"\n  "$2"\n  "$3"\n  "$4"\n  "$5"\n  "$6}'
  44
  45
  46
  47
  48

In a conky:
2015_11_14_12_53_09_Scrot11.jpg

${alignc}--== ${time %b %d %Y} ==--
Sun: Week N° ${pre_exec ncal -w | tail -1 | awk '{print $1}'}
Sun: Week N° ${pre_exec ncal -S -w | tail -1 | awk '{print $1}'}
Mon: Week N° ${pre_exec ncal -M -w | tail -1 | awk '{print $1}'}

Sun: ${pre_exec ncal -w | tail -1 | awk '{print $1" "$2" "$3" "$4" "$5" "$6}'}
Sun: ${pre_exec ncal -S -w | tail -1 | awk '{print $1" "$2" "$3" "$4" "$5" "$6}'}
Mon: ${pre_exec ncal -M -w | tail -1 | awk '{print $1" "$2" "$3" "$4" "$5" "$6}'}

${pre_exec ncal -w | tail -1 | awk '{print $1"\n"$2"\n"$3"\n"$4"\n"$5"\n"$6}'}

${pre_exec ncal -w | tail -1 | awk '{print "  "$1"\n  "$2"\n  "$3"\n  "$4"\n  "$5"\n  "$6}'}

And an UGLY (for the code) fix that looks OK:
2015_11_14_13_04_26_Scrot11.jpg««--»» Nov2015.png

TEXT
${alignc}${color0}${time %X}
${alignc}${color}SU MO ${color0}${time %b %Y}${color} FR SA
${goto 37}${color1}${execpi 1800 LAR=`date +%-d`; ncal -bh | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color0}&${color1}/' | sed ':a;N;$!ba;s/\n/\n${goto 37}/g'}${color}${font}

${alignc}${color0}${time %X}
${alignc}${color}MO TU ${color0}${time %b %Y}${color} SA SU
${goto 37}${color1}${execpi 1800 LAR=`date +%-d`; ncal -bhM | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color0}&${color1}/' | sed ':a;N;$!ba;s/\n/\n${goto 37}/g'}${color}${font}

${alignc}${color5}${time %T}
${alignc}${time %b %Y}${color}
${alignc}${color}CW ${if_match ${time %w}==0}${color5}Su${color1} Mo Tu We Th Fr Sa${else}\
${if_match ${time %w}==1}${color1}Su ${color5}Mo${color1} Tu We Th Fi Sa${else}\
${if_match ${time %w}==2}${color1}Su Mo ${color5}Tu${color1} We Th Fr Sa${else}\
${if_match ${time %w}==3}${color1}Su Mo Tu ${color5}We${color1} Th Fr Sa${else}\
${if_match ${time %w}==4}${color1}Su Mo Tu We ${color5}Th${color1} Fr Sa${else}\
${if_match ${time %w}==5}${color1}Su Mo Tu We Th ${color5}Fr${color1} Sa${else}\
${color1}Su Mo Tu We Th Fr ${color5}Sa${color}\
${endif}${endif}${endif}${endif}${endif}${endif}
${goto 48}${color1}${execpi 1800 LAR=`date +%-d`; ncal -bh | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color5}&${color1}/' | sed ':a;N;$!ba;s/\n/\n${goto 48}/g'}${color}
${voffset -83}${pre_exec ncal -w | tail -1 | awk '{print "   "$1"\n   "$2"\n   "$3"\n   "$4"\n   "$5"\n   "$6}'}

${color}${alignc}S Y S T E M    I N F O

At least it works!
Depending on your font and size - fiddling with the spacing may be required.


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

#38 2015-11-14 18:34:25

nore
>2⁹
From: blueberry bush
Registered: 2015-09-29
Posts: 434

Re: Conky - Calendars / Clocks / Time

It's alive! [Takes a few charleston steps, then bows to the master]
Screenshot_14_11_2015_20_25_05.jpg

TEXT
${font Cuprum: size=36}${color0}${time %H}${voffset 10}${font Cuprum: size=28}${color1}${time %M}${font Cuprum: size=12}${color1}${voffset -40}
${alignr}${time %A}
${alignr}${time %d.%m.%Y}
${alignr}vko ${time %V}${color1}${font}${voffset 20}

${color1}${goto 70}${execpi 1800 LAR=`date +%-d`; ncal -wbhM| sed -e 's/\<'$LAR'\>/${color2}&${color1}/' | sed ':a;N;$!ba;s/\n/\n${goto 70}/g'}${color0}
${voffset -113}${pre_exec ncal -w | tail -1 | awk '{print "   "$1"\n   "$2"\n   "$3"\n   "$4"\n   "$5"\n   "$6}'}

${color1}${goto 70}${execpi 900 ncal -bh -m `date +%m` -A1 -B-1 | sed ':a;N;$!ba;s/\n/\n${goto 70}/g'}${color}${font}${color0}
${voffset -113}${pre_exec ncal -w -A1 -B-1| tail -1 | awk '{print "   "$1"\n   "$2"\n   "$3"\n   "$4"\n   "$5"\n   "$6}'}

Whole conky

Last edited by nore (2015-11-14 19:42:14)

Offline

#39 2015-11-14 19:28:54

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

Re: Conky - Calendars / Clocks / Time

^ Looks good nore.  smile
Glad to have helped.

nore wrote:

It's alive! [Takes a few charleston steps, then bows to the master]

Saw that in the "email" and had a vision of a lumberjack putting his axe into the chopping block and doing the Charleston among the chopped wood.**

You did talk about axes and chopping wood once at #! didn't you?  Or am I going mad?

Also: It never occurred to me to use "time %V" - or "%U or %W" for week number ...  good catch!

** "It's alive!" is much more entertaining than "It works!" wink

Last edited by Sector11 (2015-11-14 19:32:10)


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

#40 2015-11-15 07:24:08

nore
>2⁹
From: blueberry bush
Registered: 2015-09-29
Posts: 434

Re: Conky - Calendars / Clocks / Time

I've done my chopping, now I can leave yet another (new!) axe behind the dresser and sit in my rocking chair by the fire playing with conky.
The calendar leaps over the new year without stumbling:
Screenshot_15_11_2015_08_45_57.jpg
Three months

Offline

#41 2015-11-15 13:24:25

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

Re: Conky - Calendars / Clocks / Time

nore wrote:

I've done my chopping, now I can leave yet another (new!) axe behind the dresser and sit in my rocking chair by the fire playing with conky.
The calendar leaps over the new year without stumbling:
http://s17.postimg.org/4x646bjpn/Screenshot_15_11_2015_08_45_57.jpg
Three months

Well, at least I remembered you talked about axe's and chopping at one time.

Interesting ncal works off a systems "locale" and for Argentina that means months that start with Sunday.  'time' has three ways of calculating week numbers and ncal only two ... so there will be differences.

time wrote:

%U  The week number of the current year as a decimal number, range 00 to 53, starting with the first Sunday as the first day of week 01. See also %V and %W.

%V  The ISO 8601:1988 week number of the current year as a decimal number, range 01 to 53, where week 1 is the first week that has at least 4 days in the current year, and with Monday as the first day of the week. See also %U and %W.

%W  The week number of the current year as a decimal number, range 00 to 53, starting with the first Monday as the first day of week 01.

And I think with the -M or -S of ncal it only changes the "display" not the months 'starting' week number.  My test conky - notice the difference in the two November displays:
2015_11_15_10_22_21_Scrot11.jpg
Top: calendar: ncal -bh and ncal -w for weeks ...
Bottom three: ncal -bhM and ncal -wM

So as long as one is willing to accept these are not 100% the same as a year = 365/366 days we're happy.  wink

You started a good thing nore.


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

#42 2015-11-15 14:00:36

nore
>2⁹
From: blueberry bush
Registered: 2015-09-29
Posts: 434

Re: Conky - Calendars / Clocks / Time

You are right about locales, one can never be too careful with them. But as long as ncal seems to support my locale, I'm content with it.

Offline

#43 2015-11-15 16:24:56

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

Re: Conky - Calendars / Clocks / Time

^  Yup, so am I.  It's like a conversation with an old boss, in 1968, use to go:

Boss: Are you done?
Me: Yup!
Boss: Is it perfect?
Me: Close enough.
Boss: This is the government, it has to be perfect!
Me: OK, it's perfect.
Boss: That's close enough!

roll


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

#44 2015-11-19 15:21:05

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

Re: Conky - Calendars / Clocks / Time

Sector11 wrote:

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

from here: https://forums.bunsenlabs.org/viewtopic … 6694#p6694

You are welcome  smile
https://www.dropbox.com/s/yofp1h8vcor7l … 4.1.tar.gz

Offline

#45 2015-11-20 11:00:10

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

Re: Conky - Calendars / Clocks / Time

>>>>Conky V1.09 <<<<

Hello there,

it is possible to bring the weather of TeoBigusGeekus in this clock in order.

I suppose it is this error:

<snip
--2015-11-19 23:02:25--  http://www.accuweather.com/en/de/lichtenstein/09350/daily-weather-forecast/171261?day=6
Auflösen des Hostnamens »www.accuweather.com (www.accuweather.com)« … 104.85.166.106, 104.85.166.74
Verbindungsaufbau zu www.accuweather.com (www.accuweather.com)|104.85.166.106|:80 … verbunden.
HTTP-Anforderung gesendet, auf Antwort wird gewartet … 200 OK
Länge: nicht spezifiziert [text/html]
Wird in »»/home/unklar/.Conky/cronograph/accuweather/last_days_raw«« gespeichert.

/home/unklar/.Conky/c     [ <=>                ]  99,76K  --.-KB/s   in 0,09s  

2015-11-19 23:02:25 (1,13 MB/s) - »/home/unklar/.Conky/cronograph/accuweather/last_days_raw« gespeichert [102159]
Conky: unknown variable 
Conky: unknown variable 
Conky: unknown variable
... etc.
<snip

TBGuhr.th.jpg

pakage

Script-Error (?) > https://forums.bunsenlabs.org/viewtopic … 5037#p5037

Last edited by unklar (2016-06-13 20:30:34)

Offline

#46 2015-11-20 17:48:06

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

Re: Conky - Calendars / Clocks / Time

Can you show the conky and the LUA script for that please. (I have your "package")

There should be no problem displaying them both in one conky... I have one I'm fixing from this one because that moon script is defunct.
2015_11_20_14_42_00_Scrot11.jpg
... another of my projects displayed before time.  yikes


The error you pointed to has been fixed ... you beed to download the latest Accuweather scripts.  The website changed the way 'they' do things so Teo changed the scripts to match.

EDIT 1
The error is because weather.com has changed their way of doing things and the script failed.  They do that a lot.  That's why Teo backed away from them.  Pick another as you linked to, grab the newest version of the script and tweak it in place.

EDIT 2
I have your Package - YUP, dump the old Teo accuweather script and use a new one of your choice.
If you need help - YELL!  smile

EDITed again ... I was asleep at the wheel.


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

#47 2015-11-21 09:09:08

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

Re: Conky - Calendars / Clocks / Time

Sector11 wrote:

Can you show the conky and the LUA script for that please. (I have your "package")

conkyrc

# — Conky settings — #

background yes

update_interval 1
total_run_times 0
net_avg_samples 2

override_utf8_locale yes

double_buffer yes
no_buffers yes

text_buffer_size 2048
imlib_cache_size 0

#temperature_unit celcius

# — Window specifications — #

own_window_class Conky
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager

border_inner_margin 0
border_outer_margin 0

minimum_size 300 300
maximum_width 300

alignment top_right

gap_x 30
gap_y 75


# — Graphics settings — #
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no

# — Text settings — #
use_xft yes
xftfont hooge 05_53:size=6
xftalpha 0.5

default_color FFFFFF

uppercase no
use_spacer right

color0 white
color1 orange
color2 green

# — Lua Load — #

lua_load $HOME/.Conky/cronograph/scripts/clock_rings.lua
lua_draw_hook_pre clock_rings
lua_load $HOME/.Conky/cronograph/scripts/multi_rings.lua
lua_draw_hook_post main

TEXT
${execi 500 bash $HOME/.Conky/cronograph/accuweather/accuw_script}
${voffset 29}${offset 120}BAT:
${voffset 17}${goto 65}${font hooge 05_53:size=12}${time %H:%M}${font}${goto 185}UPTIME:
${voffset 2}${goto 65}${time %a %d %b}${goto 185}${uptime}
${voffset 2}${goto 65}${time %Y}
${voffset -6}${goto 145}HD
${voffset 12}${alignc}${fs_free}/${fs_size}
${voffset 36}${goto 91}${cpu cpu0}%${goto 221}${memperc}%
${voffset 10}${goto 76}CPU${goto 205}MEM
${voffset 20}${goto 90}${font hooge 05_53:size=12}${execpi 600 sed -n '4p' $HOME/.Conky/cronograph/accuweather/curr_cond}°${voffset -32}${goto 125}${font conkyweather:size=40}${execpi 600 sed -n '2p' $HOME/.Conky/cronograph/accuweather/curr_cond}${font}${voffset -12}${goto 185}${execpi 600 sed -n '3p' $HOME/.Conky/cronograph/accuweather/curr_cond}${voffset 12}${goto 185}${font conkyweather:size=20}${voffset 7}${goto 80}${execpi 600 sed -n '7p' $HOME/.Conky/cronograph/accuweather/tod_ton}${goto 135}${execpi 600 sed -n '12p' $HOME/.Conky/cronograph/accuweather/tod_ton}${goto 185}${execpi 600 sed -n '17p' $HOME/.Conky/cronograph/accuweather/tod_ton}${font}${voffset 6}${goto 84}${execpi 600 sed -n '9p' $HOME/.Conky/cronograph/accuweather/tod_ton}°/${execpi 600 sed -n '10p' $HOME/.Conky/cronograph/accuweather/tod_ton}°${goto 140}${execpi 600 sed -n '14p' $HOME/.Conky/cronograph/accuweather/tod_ton}°/${execpi 600 sed -n '15p' $HOME/.Conky/cronograph/accuweather/tod_ton}°${goto 190}${execpi 600 sed -n '19p' $HOME/.Conky/cronograph/accuweather/tod_ton}°/${execpi 600 sed -n '20p' $HOME/.Conky/cronograph/accuweather/tod_ton}°${voffset 7}${goto 85}${execpi 600 sed -n '6p' $HOME/.Conky/cronograph/accuweather/tod_ton}${goto 140}${execpi 600 sed -n '11p' $HOME/.Conky/cronograph/accuweather/tod_ton}${goto 190}${execpi 600 sed -n '16p' $HOME/.Conky/cronograph/accuweather/tod_ton}
${if_match ${battery_percent BAT0}>0}${if_match ${battery_percent BAT0}<=15}${image $HOME/.Conky/cronograph/images/Red.png -p 129,18 -s 40x40}${endif}${endif}
${if_match ${battery_percent BAT0}>15}${if_match ${battery_percent BAT0}<=20}${image $HOME/.Conky/cronograph/images/Orange.png -p 129,18 -s 40x40}${endif}${endif}
${if_match ${battery_percent BAT0}>20}${if_match ${battery_percent BAT0}<=35}${image $HOME/.Conky/cronograph/images/Yellow.png -p 129,18 -s 40x40}${endif}${endif}
${if_match ${battery_percent BAT0}>35}${if_match ${battery_percent BAT0}<=100}${image $HOME/.Conky/cronograph/images/Dark_Green.png -p 129,18 -s 40x40}${endif}${endif}
${execpi 1 cat $HOME/.Conky/cronograph/scripts/blinkingLED}

accuw_script

#!/bin/bash

#function: test_image_day
test_image_day () {
    case $1 in
         su)
           echo a
         ;;
         msu)
           echo b 
         ;;
         psu)
           echo c
         ;;
         ic)
           echo c
         ;;
         h)
           echo c
         ;;
         mc)
           echo d
         ;;
         c)
           echo e
         ;;
         d)
           echo e
         ;;
         f)
           echo 0
         ;;
         s)
           echo h
         ;;
         mcs)
           echo g
         ;;
         psus)
           echo g
         ;;
         t)
           echo l
         ;;
         mct)
           echo k
         ;;
         psut)
           echo k
         ;;
         r)
           echo i
         ;;
         fl)
           echo p
         ;;
         mcfl)
           echo o
         ;;
         psfl)
           echo o
         ;;
         sn)
           echo r
         ;;
         mcsn)
           echo o
         ;;
         i)
           echo E
         ;;
         sl)
           echo u
         ;;
         fr)
           echo i
         ;;
         rsn)
           echo v
         ;;
         w)
           echo 6
         ;;
         ho)
           echo 5
         ;;
         co)
           echo E
         ;;
         cl)
           echo A
         ;;
         mcl)
           echo B
         ;;
         pc)
           echo C
         ;;
         pcs)
           echo G
         ;;
         pct)
           echo K
         ;;
        esac
} 

#function: test_image_night
test_image_night () {
    case $1 in
		 su)
           echo a
         ;;
         msu)
           echo b
         ;;
         psu)
           echo c
         ;;
         c)
           echo f
         ;;
         d)
           echo f
         ;;
         f)
           echo f
         ;;
         s)
           echo h
         ;;
         psus)
           echo g
         ;;
         t)
           echo l
         ;;
         psut)
           echo k
         ;;
         r)
           echo i
         ;;
         fl)
           echo p
         ;;
         psfl)
           echo o
         ;;
         sn)
           echo r
         ;;
         i)
           echo E
         ;;
         sl)
           echo u
         ;;
         fr)
           echo i
         ;;
         rsn)
           echo v
         ;;
         ho)
           echo 5
         ;;
         co)
           echo E
         ;;
         cl)
           echo A
         ;;
         w)
           echo 6
         ;;
         mcl)
           echo B
         ;;
         pc)
           echo C
         ;;
         ic)
           echo B
         ;;
         h)
           echo B
         ;;
         mc)
           echo C
         ;;
         pcs)
           echo G
         ;;
         mcs)
           echo G
         ;;
         pct)
           echo K
         ;;
         mct)
           echo K
         ;;
         mcfl)
           echo O
         ;;
         mcsn)
           echo O
         ;;
        esac
}

killall wget

#put your Accuweather address here
#address="http://www.accuweather.com/en/pt/amadora/274011/weather-forecast/274011"
address="http://www.accuweather.com/en/de/lichtenstein/09350/weather-forecast/171261"

loc_id=$(echo $address|sed 's/\/weather-forecast.*$//'|sed 's/^.*\///')
last_number=$(echo $address|sed 's/^.*\///')

curr_addr="$(echo $address|sed 's/weather-forecast.*$//')"current-weather/"$last_number"
wget -O $HOME/.Conky/cronograph/accuweather/curr_cond_raw "$curr_addr"

addr1="$(echo $address|sed 's/weather-forecast.*$//')"daily-weather-forecast/"$last_number"
wget -O $HOME/.Conky/cronograph/accuweather/tod_ton_raw "$addr1"

addr2="$addr1"?day=6
wget -O $HOME/.Conky/cronograph/accuweather/last_days_raw "$addr2"

#current conditions
if [[ -s $HOME/.Conky/cronograph/accuweather/curr_cond_raw ]]; then

    sed -i '/detail-now/,/#details/!d' $HOME/.Conky/cronograph/accuweather/curr_cond_raw
    egrep -i '"cond"|icon i-|detail-tab-panel' $HOME/.Conky/cronograph/accuweather/curr_cond_raw > $HOME/.Conky/cronograph/accuweather/curr_cond
    sed -i -e 's/^.*detail-tab-panel //g' -e 's/^.*icon i-//g' -e 's/"><\/div>.*$//g' $HOME/.Conky/cronograph/accuweather/curr_cond
    sed -i -e 's/^.*"cond">//g' -e 's/&deg/\n/g' -e 's/<\/span>.*"temp">/\n/g' -e 's/<.*>//g' $HOME/.Conky/cronograph/accuweather/curr_cond
    sed -i -e 's/">//g' -e 's/-->//g' -e 's/\r$//g' -e 's/ i-alarm.*$//g' $HOME/.Conky/cronograph/accuweather/curr_cond
	time=$(sed -n 1p $HOME/.Conky/cronograph/accuweather/curr_cond)
    image=$(sed -n 2p $HOME/.Conky/cronograph/accuweather/curr_cond)
	if [[ $time == day ]]; then
	    sed -i 2s/$image/$(test_image_day $image)/ $HOME/.Conky/cronograph/accuweather/curr_cond
	elif [[ $time == night ]]; then
	    sed -i 2s/$image/$(test_image_night $image)/ $HOME/.Conky/cronograph/accuweather/curr_cond
	fi

fi

#First 5 days
if [[ -s $HOME/.Conky/cronograph/accuweather/tod_ton_raw ]]; then

    sed -i '/feed-tabs/,/\.feed-tabs/!d' $HOME/.Conky/cronograph/accuweather/tod_ton_raw
    egrep -i 'Early AM|Today|Tonight|Overnight|icon i-|cond|temp|Mon|Tue|Wed|Thu|Fri|Sat|Sun' $HOME/.Conky/cronograph/accuweather/tod_ton_raw > $HOME/.Conky/cronograph/accuweather/tod_ton
    sed -i -e 's/^.*#">//g' -e 's/^.*icon i-//g' -e 's/^.*cond">//g' -e 's/^.*temp">//g' $HOME/.Conky/cronograph/accuweather/tod_ton
    sed -i -e 's/Lo<\/span> /\n/g' -e 's/<\/a>.*$//g' -e 's/ "><.*$//g' -e 's/&#.*$//g' -e 's/teo//g' $HOME/.Conky/cronograph/accuweather/tod_ton
    sed -i -e 's/<span>.*$//g' -e 's/<\/span>//g' -e 's/\r$//g' -e 's/ i-alarm.*$//g' $HOME/.Conky/cronograph/accuweather/tod_ton
	sed -i -e 's/Early AM/EARLY AM/' -e 's/Today/TODAY/' -e 's/Tonight/TONIGHT/' -e 's/Overnight/OVERNIGHT/' -e 's/Mon/MON/' -e 's/Tue/TUE/' -e 's/Wed/WED/' -e 's/Thu/THU/' -e 's/Fri/FRI/' -e 's/Sat/SAT/' -e 's/Sun/SUN/' $HOME/.Conky/cronograph/accuweather/tod_ton
    time=$(sed -n 1p $HOME/.Conky/cronograph/accuweather/tod_ton)
    image=$(sed -n 2p $HOME/.Conky/cronograph/accuweather/tod_ton)
	if [[ $time == TODAY ]]; then
	    sed -i 2s/$image/$(test_image_day $image)/ $HOME/.Conky/cronograph/accuweather/tod_ton
	elif [[ $time == TONIGHT || $time == OVERNIGHT || $time == "EARLY AM" ]]; then
	    sed -i 2s/$image/$(test_image_night $image)/ $HOME/.Conky/cronograph/accuweather/tod_ton
        sed -i 3a- $HOME/.Conky/cronograph/accuweather/tod_ton
	fi
    for (( i=7; i<=22; i+=5 ))
	  do
          image=$(sed -n "${i}"p $HOME/.Conky/cronograph/accuweather/tod_ton)
	      sed -i ${i}s/$image/$(test_image_day $image)/ $HOME/.Conky/cronograph/accuweather/tod_ton
	  done

fi

#Next 5 days
if [[ -s $HOME/.Conky/cronograph/accuweather/last_days_raw ]]; then

    sed -i '/feed-tabs/,/\.feed-tabs/!d' $HOME/.Conky/cronograph/accuweather/last_days_raw
    egrep -i 'icon i-|cond|temp|Mon|Tue|Wed|Thu|Fri|Sat|Sun' $HOME/.Conky/cronograph/accuweather/last_days_raw > $HOME/.Conky/cronograph/accuweather/last_days
    sed -i -e 's/^.*#">//g' -e 's/^.*icon i-//g' -e 's/^.*cond">//g' -e 's/^.*temp">//g' $HOME/.Conky/cronograph/accuweather/last_days
    sed -i -e 's/Lo<\/span> /\n/g' -e 's/<\/a>.*$//g' -e 's/ "><.*$//g' -e 's/&#.*$//g' -e 's/teo//g' $HOME/.Conky/cronograph/accuweather/last_days
    sed -i -e 's/<span>.*$//g' -e 's/<\/span>//g' -e 's/\r$//g' -e 's/ i-alarm.*$//g' $HOME/.Conky/cronograph/accuweather/last_days
	sed -i -e 's/Mon/MON/' -e 's/Tue/TUE/' -e 's/Wed/WED/' -e 's/Thu/THU/' -e 's/Fri/FRI/' -e 's/Sat/SAT/' -e 's/Sun/SUN/' $HOME/.Conky/cronograph/accuweather/last_days
    for (( i=2; i<=22; i+=5 ))
	  do
          image=$(sed -n "${i}"p $HOME/.Conky/cronograph/accuweather/last_days)
	      sed -i ${i}s/$image/$(test_image_day $image)/ $HOME/.Conky/cronograph/accuweather/last_days
	  done

fi

Offline

#48 2015-11-21 11:51:47

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

Re: Conky - Calendars / Clocks / Time

^ That is an OLD accuweather script - not supported anymore.  Grab the latest 1b2)Accuweather - ConkyWeather font - 1b2_29-10-15.  I'm working on a test conky now, but I have no battery - so that doesn't show in "my" clock.

I will have a working conky sometime today when I get home.
2015_11_21_08_50_44_Scrot11.jpg


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

#49 2015-11-21 13:36:07

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

Re: Conky - Calendars / Clocks / Time

^  I have a working test ... back later to finish it.
2015_11_21_10_32_45_Scrot11.jpg


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

#50 2015-11-21 15:02:38

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

Re: Conky - Calendars / Clocks / Time

Great masters, thank you
I'll be at your own pace by not ... wink

Adjustments to the configurations in 1 b 2-script and the conkyrc result:
0nk3DhyB
conkyrc

# — Conky settings — #

background yes

update_interval 1
total_run_times 0
net_avg_samples 2

override_utf8_locale yes

double_buffer yes
no_buffers yes

text_buffer_size 2048
imlib_cache_size 0

#temperature_unit celcius

# — Window specifications — #

own_window_class Conky
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager

border_inner_margin 0
border_outer_margin 0

minimum_size 300 300
maximum_width 300

alignment top_right

gap_x 30
gap_y 75


# — Graphics settings — #
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no

# — Text settings — #
use_xft yes
xftfont hooge 05_53:size=6
xftalpha 0.5

default_color FFFFFF

uppercase no
use_spacer right

color0 white
color1 orange
color2 green

# — Lua Load — #

lua_load $HOME/.Conky/cronograph/scripts/clock_rings.lua
lua_draw_hook_pre clock_rings
lua_load $HOME/.Conky/cronograph/scripts/multi_rings.lua
lua_draw_hook_post main

TEXT
${execi 500 bash $HOME/.Conky/cronograph/accuweather/1b2}
${voffset 29}${offset 120}BAT:
${voffset 17}${goto 65}${font hooge 05_53:size=12}${time %H:%M}${font}${goto 185}UPTIME:
${voffset 2}${goto 65}${time %a %d %b}${goto 185}${uptime}
${voffset 2}${goto 65}${time %Y}
${voffset -6}${goto 145}HD
${voffset 12}${alignc}${fs_free}/${fs_size}
${voffset 36}${goto 91}${cpu cpu0}%${goto 221}${memperc}%
${voffset 10}${goto 76}CPU${goto 205}MEM
${voffset 20}${goto 90}${font hooge 05_53:size=12}${execpi 600 sed -n '4p' $HOME/.Conky/cronograph/accuweather/curr_cond}°${voffset -32}${goto 125}${font conkyweather:size=40}${execpi 600 sed -n '2p' $HOME/.Conky/cronograph/accuweather/curr_cond}${font}${voffset -12}${goto 185}${execpi 600 sed -n '3p' $HOME/.Conky/cronograph/accuweather/curr_cond}${voffset 12}${goto 185}${font conkyweather:size=20}${voffset 7}${goto 80}${execpi 600 sed -n '7p' $HOME/.Conky/cronograph/accuweather/tod_ton}${goto 135}${execpi 600 sed -n '12p' $HOME/.Conky/cronograph/accuweather/tod_ton}${goto 185}${execpi 600 sed -n '17p' $HOME/.Conky/cronograph/accuweather/tod_ton}${font}${voffset 6}${goto 84}${execpi 600 sed -n '9p' $HOME/.Conky/cronograph/accuweather/tod_ton}°/${execpi 600 sed -n '10p' $HOME/.Conky/cronograph/accuweather/tod_ton}°${goto 140}${execpi 600 sed -n '14p' $HOME/.Conky/cronograph/accuweather/tod_ton}°/${execpi 600 sed -n '15p' $HOME/.Conky/cronograph/accuweather/tod_ton}°${goto 190}${execpi 600 sed -n '19p' $HOME/.Conky/cronograph/accuweather/tod_ton}°/${execpi 600 sed -n '20p' $HOME/.Conky/cronograph/accuweather/tod_ton}°${voffset 7}${goto 85}${execpi 600 sed -n '6p' $HOME/.Conky/cronograph/accuweather/tod_ton}${goto 140}${execpi 600 sed -n '11p' $HOME/.Conky/cronograph/accuweather/tod_ton}${goto 190}${execpi 600 sed -n '16p' $HOME/.Conky/cronograph/accuweather/tod_ton}
${if_match ${battery_percent BAT0}>0}${if_match ${battery_percent BAT0}<=15}${image $HOME/.Conky/cronograph/images/Red.png -p 129,18 -s 40x40}${endif}${endif}
${if_match ${battery_percent BAT0}>15}${if_match ${battery_percent BAT0}<=20}${image $HOME/.Conky/cronograph/images/Orange.png -p 129,18 -s 40x40}${endif}${endif}
${if_match ${battery_percent BAT0}>20}${if_match ${battery_percent BAT0}<=35}${image $HOME/.Conky/cronograph/images/Yellow.png -p 129,18 -s 40x40}${endif}${endif}
${if_match ${battery_percent BAT0}>35}${if_match ${battery_percent BAT0}<=100}${image $HOME/.Conky/cronograph/images/Dark_Green.png -p 129,18 -s 40x40}${endif}${endif}
${execpi 1 cat $HOME/.Conky/cronograph/scripts/blinkingLED}

1b2_script

#!/bin/bash

#function: test_image
test_image () {
    case $1 in
         1)
           echo a
         ;;
         2|3)
           echo b 
         ;;
         4|5)
           echo c
         ;;
         6)
           echo d
         ;;
         7)
           echo e
         ;;
         8)
           echo f
         ;;
         11)
           echo 0
         ;;
         12)
           echo h
         ;;
         13|14)
           echo g
         ;;
         15)
           echo m
         ;;
         16|17)
           echo k
         ;;
         18)
           echo i
         ;;
         19)
           echo q
         ;;
         20|21|23)
           echo o
         ;;
         22)
           echo r
         ;;
         24|31)
           echo E
         ;;
         25)
           echo v
         ;;
         26)
           echo x
         ;;
         29)
           echo y
         ;;
         30)
           echo 5
         ;;
         32)
           echo 6
         ;;
         33)
           echo A
         ;;
         34|35)
           echo B
         ;;
         36|37)
           echo C
         ;;
         38)
           echo D
         ;;
         39|40)
           echo G
         ;;
         41|42)
           echo K
         ;;
         43|44)
           echo O
         ;;
         *)
		   echo -
		 ;;   
        esac
} 

#put your Accuweather address here
#address="http://www.accuweather.com/en/gr/kastoria/178682/weather-forecast/178682"
address="http://www.accuweather.com/en/de/lichtenstein/09350/weather-forecast/171261"

loc_id=$(echo $address|sed 's/\/weather-forecast.*$//'|sed 's/^.*\///')
last_number=$(echo $address|sed 's/^.*\///')

curr_addr="$(echo $address|sed 's/weather-forecast.*$//')"current-weather/"$last_number"

addr1="$(echo $address|sed 's/weather-forecast.*$//')"daily-weather-forecast/"$last_number"
addr2="$addr1"?day=6

kill -STOP $(pidof conky)
killall wget

wget --save-cookies $HOME/.Conky/cronograph/accuweather/cookie -O $HOME/.Conky/cronograph/accuweather/curr_cond_raw $curr_addr
wget --load-cookies $HOME/.Conky/cronograph/accuweather/cookie -O $HOME/.Conky/cronograph/accuweather/first_days_raw $addr1
wget --load-cookies $HOME/.Conky/cronograph/accuweather/cookie -O $HOME/.Conky/cronograph/accuweather/last_days_raw $addr2

#Current Conditions - curr_cond file
if [[ -s $HOME/.Conky/cronograph/accuweather/curr_cond_raw ]]; then

	egrep -i '"detail-tab-panel |>Today<\/a>|>Tonight<\/a>|>Early AM<\/a>|>Overnight<\/a>|>Mon<\/a>|>Tue<\/a>|>Wed<\/a>|>Thu<\/a>|>Fri<\/a>|>Sat<\/a>|>Sun<\/a>|icon i-|"cond"|"temp"|icons-wind\/.*gif|text-align:center\;\">.*h</div>|Humidity: |Pressure: |Cloud Cover: |UV Index: |Dew Point: |Precipitation(1 hr): |Visibility: |"start">|"finish">' $HOME/.Conky/cronograph/accuweather/curr_cond_raw > $HOME/.Conky/cronograph/accuweather/curr_cond
    sed -i -e 's/^[ \t]*//g' -e 's/^.*icon i-//g' -e 's/^.*"cond">//g' -e 's/>Lo</\n/g' -e 's/RealFeel/\n/g' $HOME/.Conky/cronograph/accuweather/curr_cond
    sed -i -e 's/^.*"#">//g' -e 's/^.*<strong class="temp"//g' -e 's/^>//g' -e 's/<span>&deg.*$//g' $HOME/.Conky/cronograph/accuweather/curr_cond
    sed -i -e 's/<\/a>.*$//g' -e 's/\/span> //g' -e 's/"temp">/\n/g' -e 's/^.*icons-wind\///g' -e 's/^.*text-align:center\;\">//g' $HOME/.Conky/cronograph/accuweather/curr_cond
    sed -i -e 's/^.*"start">//g' -e 's/^.*"finish">//g' -e 's/<li>//g' -e 's/<strong>//g' -e 's/<<span.*$//g' $HOME/.Conky/cronograph/accuweather/curr_cond
    sed -i -e 's/<\/span>//g' -e 's/<\/strong><\/li>//g' -e 's/ "><\/div>//g' -e 's/'\''//g' $HOME/.Conky/cronograph/accuweather/curr_cond
    sed -i -e 's/"><\/div>//g' -e 's/^.*; //g' -e 's/&#.*$//g' -e 's/ i-alarm.*$//g' -e 's/;//g' $HOME/.Conky/cronograph/accuweather/curr_cond
    sed -i -e 's/Humidity: //g' -e 's/Pressure: //g' -e 's/Cloud Cover: //g' -e 's/UV Index: //g' -e 's/Dew Point: //g' -e 's/Visibility: //g' $HOME/.Conky/cronograph/accuweather/curr_cond
    sed -i -e 's/^.*detail-tab-panel //g' -e 's/">//g' -e 's/\r//g' -e 's/ *$//g' -e 's/mb.*$/mb/g' $HOME/.Conky/cronograph/accuweather/curr_cond
    sed -i -e 's/-s\|-xl.*$//g' -e 's/in &.*$/in/g' -e 's/\.gif.*$//g' -e 's/<\/div>.*$//g' $HOME/.Conky/cronograph/accuweather/curr_cond
    time=$(sed -n 1p $HOME/.Conky/cronograph/accuweather/curr_cond)
    if [[ $time == Tonight || $time == Overnight || $time == "Early AM" ]]; then
        sed -i 3a- $HOME/.Conky/cronograph/accuweather/curr_cond
	fi
    line35=$(sed -n 35p $HOME/.Conky/cronograph/accuweather/curr_cond)
    sed -i '35d' $HOME/.Conky/cronograph/accuweather/curr_cond
    sed -i 35a$line35 $HOME/.Conky/cronograph/accuweather/curr_cond
	image=$(sed -n 27p $HOME/.Conky/cronograph/accuweather/curr_cond)
	sed -i 27s/$image/$(test_image $image)/ $HOME/.Conky/cronograph/accuweather/curr_cond
	
fi

#First 5days - first_days file 
if [[ -s $HOME/.Conky/cronograph/accuweather/first_days_raw ]]; then

    sed -i '/<div class="column-1 clearfix">/,/<div id=\"feature-history\">/!d' $HOME/.Conky/cronograph/accuweather/first_days_raw
    egrep -i '>Today<|<p>[a-z]|>Mon<\/a>|>Tue<\/a>|>Wed<\/a>|>Thu<\/a>|>Fri<\/a>|>Sat<\/a>|>Sun<\/a>|icon i-|"cond"|"temp"|realfeel">RealFeel|realfeel">Precipitation' $HOME/.Conky/cronograph/accuweather/first_days_raw > $HOME/.Conky/cronograph/accuweather/first_days

    sed -i -e 's/^[ \t]*//g' -e 's/^.*icon i-//g' -e 's/^.*"cond">//g' -e 's/>Lo</\n/g' $HOME/.Conky/cronograph/accuweather/first_days
    sed -i -e 's/ "><\/div>//g' -e 's/"><\/div>//g' -e 's/^.*"temp">//g' -e 's/<span>&deg.*$//g' $HOME/.Conky/cronograph/accuweather/first_days
    sed -i -e 's/<p>//g' -e 's/<\/p>//g' -e 's/^.*"#">//g' -e 's/\/span> //g' -e 's/^.*>Precipitation //g' -e '/realfeel/s/^.*; //g' $HOME/.Conky/cronograph/accuweather/first_days
    sed -i -e 's/&#.*$//g' -e 's/<.*$//g' -e 's/ i-alarm.*$//g' -e 's/\r//g' -e 's/ *$//g' $HOME/.Conky/cronograph/accuweather/first_days
	sed -i -e 's/Today/TODAY/' -e 's/Mon$/MONDAY/' -e 's/Tue$/TUESDAY/' -e 's/Wed$/WEDNESDAY/' -e 's/Thu$/THURSDAY/' -e 's/Fri$/FRIDAY/' -e 's/Sat$/SATURDAY/' -e 's/Sun$/SUNDAY/' $HOME/.Conky/cronograph/accuweather/first_days
    sed -i 's/-s\|-l.*$//g' $HOME/.Conky/cronograph/accuweather/first_days
    time=$(sed -n 1p $HOME/.Conky/cronograph/accuweather/curr_cond)
    if [[ $time == Tonight || $time == Overnight || $time == "Early AM" ]]; then
        sed -i 2a- $HOME/.Conky/cronograph/accuweather/first_days
	fi
	L1=$(sed -n 1p $HOME/.Conky/cronograph/accuweather/first_days)
    if [[ $L1 == TODAY ]]; then
        sed -i 1d $HOME/.Conky/cronograph/accuweather/first_days
	fi
	for (( i=6; i<=21; i+=5 ))
	  do
	      image_raw=$(sed -n "${i}"p $HOME/.Conky/cronograph/accuweather/first_days)
	      sed -i ${i}s/$image_raw/$(test_image $image_raw)/ $HOME/.Conky/cronograph/accuweather/first_days
	  done
    image_raw=$(sed -n 25p $HOME/.Conky/cronograph/accuweather/first_days)
	sed -i 25s/$image_raw/$(test_image $image_raw)/ $HOME/.Conky/cronograph/accuweather/first_days
    image_raw=$(sed -n 30p $HOME/.Conky/cronograph/accuweather/first_days)
	sed -i 30s/$image_raw/$(test_image $image_raw)/ $HOME/.Conky/cronograph/accuweather/first_days

fi


#Last 5days - last_days file 
if [[ -s $HOME/.Conky/cronograph/accuweather/last_days_raw ]]; then

    sed -i '/<div class="column-1 clearfix">/,/<div id=\"feature-history\">/!d' $HOME/.Conky/cronograph/accuweather/last_days_raw
    egrep -i '>Mon<\/a>|>Tue<\/a>|>Wed<\/a>|>Thu<\/a>|>Fri<\/a>|>Sat<\/a>|>Sun<\/a>|icon i-|"cond"|"temp"|realfeel">RealFeel|realfeel">Precipitation' $HOME/.Conky/cronograph/accuweather/last_days_raw > $HOME/.Conky/cronograph/accuweather/last_days
    sed -i -e 's/^[ \t]*//g' -e 's/^.*icon i-//g' -e 's/^.*"cond">//g' -e 's/>Lo</\n/g' $HOME/.Conky/cronograph/accuweather/last_days
    sed -i -e 's/ "><\/div>//g' -e 's/"><\/div>//g' -e 's/^.*"temp">//g' -e 's/<span>&deg.*$//g' $HOME/.Conky/cronograph/accuweather/last_days
    sed -i -e 's/^.*"#">//g' -e 's/\/span> //g' -e 's/^.*>Precipitation //g' -e 's/^.*; //g' $HOME/.Conky/cronograph/accuweather/last_days
    sed -i -e 's/&#.*$//g' -e 's/<.*$//g' -e 's/ i-alarm.*$//g' -e 's/\r//g' -e 's/ *$//g' $HOME/.Conky/cronograph/accuweather/last_days
	sed -i -e 's/Mon$/MONDAY/' -e 's/Tue$/TUESDAY/' -e 's/Wed$/WEDNESDAY/' -e 's/Thu$/THURSDAY/' -e 's/Fri$/FRIDAY/' -e 's/Sat$/SATURDAY/' -e 's/Sun$/SUNDAY/' $HOME/.Conky/cronograph/accuweather/last_days
    sed -i 's/-s\|-l.*$//g' $HOME/.Conky/cronograph/accuweather/last_days
    for (( i=2; i<=22; i+=5 ))
	  do
	      image_raw=$(sed -n "${i}"p $HOME/.Conky/cronograph/accuweather/last_days)
	      sed -i ${i}s/$image_raw/$(test_image $image_raw)/ $HOME/.Conky/cronograph/accuweather/last_days
	  done

fi

#messages file
sed -n 28p $HOME/.Conky/cronograph/accuweather/curr_cond | cut -c -20 > $HOME/.Conky/cronograph/accuweather/messages
sed -n 29p $HOME/.Conky/cronograph/accuweather/first_days | cut -c -20 >> $HOME/.Conky/cronograph/accuweather/messages
sed -n 34p $HOME/.Conky/cronograph/accuweather/first_days | cut -c -20 >> $HOME/.Conky/cronograph/accuweather/messages
for (( i=7; i<=22; i+=5 ))
  do
      sed -n ${i}p $HOME/.Conky/cronograph/accuweather/first_days | cut -c -20 >> $HOME/.Conky/cronograph/accuweather/messages
  done
for (( i=3; i<=23; i+=5 ))
  do
      sed -n ${i}p $HOME/.Conky/cronograph/accuweather/last_days | cut -c -20 >> $HOME/.Conky/cronograph/accuweather/messages
  done

kill -CONT $(pidof conky)

Error-Message:

$ Conky: forked to background, pid is 15248

Conky: desktop window (6e) is root window
Conky: window type - normal
Conky: drawing to created window (0x2000001)
Conky: drawing to double buffer
wget: Kein Prozess gefunden
--2015-11-21 15:06:38--  http://www.accuweather.com/en/de/lichtenstein/09350/current-weather/171261
Auflösen des Hostnamens »www.accuweather.com (www.accuweather.com)« … 2.20.188.156, 2.20.188.155
Verbindungsaufbau zu www.accuweather.com (www.accuweather.com)|2.20.188.156|:80 … verbunden.
HTTP-Anforderung gesendet, auf Antwort wird gewartet … 200 OK
Länge: nicht spezifiziert [text/html]
Wird in »»/home/unklar/.Conky/cronograph/accuweather/curr_cond_raw«« gespeichert.

/home/unklar/.Conky/c     [ <=>                  ] 101,08K  --.-KB/s   in 0,09s  

2015-11-21 15:06:39 (1,10 MB/s) - »/home/unklar/.Conky/cronograph/accuweather/curr_cond_raw« gespeichert [103501]

--2015-11-21 15:06:39--  http://www.accuweather.com/en/de/lichtenstein/09350/daily-weather-forecast/171261
Auflösen des Hostnamens »www.accuweather.com (www.accuweather.com)« … 2.20.188.156, 2.20.188.155
Verbindungsaufbau zu www.accuweather.com (www.accuweather.com)|2.20.188.156|:80 … verbunden.
HTTP-Anforderung gesendet, auf Antwort wird gewartet … 200 OK
Länge: nicht spezifiziert [text/html]
Wird in »»/home/unklar/.Conky/cronograph/accuweather/first_days_raw«« gespeichert.

/home/unklar/.Conky/c     [ <=>                  ] 102,70K  --.-KB/s   in 0,09s  

2015-11-21 15:06:40 (1,12 MB/s) - »/home/unklar/.Conky/cronograph/accuweather/first_days_raw« gespeichert [105163]

--2015-11-21 15:06:40--  http://www.accuweather.com/en/de/lichtenstein/09350/daily-weather-forecast/171261?day=6
Auflösen des Hostnamens »www.accuweather.com (www.accuweather.com)« … 2.20.188.156, 2.20.188.155
Verbindungsaufbau zu www.accuweather.com (www.accuweather.com)|2.20.188.156|:80 … verbunden.
HTTP-Anforderung gesendet, auf Antwort wird gewartet … 200 OK
Länge: nicht spezifiziert [text/html]
Wird in »»/home/unklar/.Conky/cronograph/accuweather/last_days_raw«« gespeichert.

/home/unklar/.Conky/c     [ <=>                  ] 101,24K  --.-KB/s   in 0,1s   

2015-11-21 15:06:41 (1,02 MB/s) - »/home/unklar/.Conky/cronograph/accuweather/last_days_raw« gespeichert [103670]

Conky: unknown variable 
Conky: unknown variable 
...etc.

Patience...   hmm

Offline

Board footer

Powered by FluxBB