You are not logged in.

#1 2021-10-04 20:04:30

jeffreyC
Member
Registered: 2019-09-07
Posts: 68

Two month calendar?

I use a very simplified BL-Def-Cal conky as a calendar on my desktop (another conky provides the system info).

Is there a simple way to get this month and next month in the calendar?

Offline

#2 2021-10-04 21:13:08

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 6,817

Re: Two month calendar?

Yes there is what is Def-Cal?

You want Vertical or horizontal?
Just need to edit one of these:
2021-10-04_181006_S11.th.jpg
I have in a box to I can open - look close.  big_smile


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

#3 2021-10-05 11:49:05

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 1,581

Re: Two month calendar?

Sector11 wrote:

Yes there is what is Def-Cal?

^He means this one  smile
Def-Cal

-- BL-Def-Cal-conky.conf

--[[ For conky variables and commands use the terminal command:

 man conky

 Bunsen Labs Conky help threads
 ------------------------------
 Index » Scripts, Tutorials & Tips » Conky - Calendars / Clocks / Time
 https://forums.bunsenlabs.org/viewtopic.php?id=516

 Open a thread and Post conky questions in: Index » GUI & Applications
 https://forums.bunsenlabs.org/viewforum.php?id=4

 Display your completed conky and codes
 Index » Scripts, Tutorials & Tips » Show us your conky
 https://forums.bunsenlabs.org/viewtopic.php?id=512
]]

conky.config = {

--  Begin Window Settings
	own_window = true,
	own_window_type = 'desktop',
	own_window_transparent = true,
	own_window_hints = 'undecorated,below,skip_taskbar,skip_pager,sticky',
	own_window_colour = '000000',
	own_window_class = 'Conky',
	own_window_title = 'BunsenLabs Default c/w Cal Conky',

--	own_window_argb_visual = true,
--	own_window_argb_value = 50,

	minimum_width = 200, minimum_height = 0,
	maximum_width = 200,

	gap_x = 20,-- l|r
	gap_y = 45,-- u|d

	alignment = 'top_right',
--  End Window Settings
--  Font Settings

	use_xft = true,
	font = 'Monospace:bold:size=9',
	xftalpha = 1,
	override_utf8_locale = true,

--  End Font Settings
--  Colour Settings

	draw_shades = false,
	default_shade_color = '000000',

	draw_outline = false,
	default_outline_color = '000000',

    default_color = '4b8bad', -- Lithium blue
--default_color = '678b8b', -- Helium Beam green
	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 = 'C0C0C0',-- Silver

--  End Colour Settings
--  Borders Section

	draw_borders = false,
	stippled_borders = 5,
	border_inner_margin = 5,
	border_outer_margin = 0,
	border_width = 2,
	draw_graph_borders = true,

--  End Borders Section
--  Miscellaneous Section

	background = true,
	use_spacer = 'none',
	text_buffer_size = 6144,
	no_buffers = true,
	short_units = true,
	imlib_cache_size = 0,
	double_buffer = true,

--  End Miscellaneous Section

	update_interval = 1,

};

conky.text = [[
${goto 28}${color1}${execpi 1800 LAR=$(date +%-d); ncal -bh | sed -e ':a;N;$!ba' -e 's/\n/\n${goto 28}/g' -e 's/\<'$LAR'\>/${color0}&${color1}/'}
${color}${font}
]];

Last edited by unklar (2021-10-05 11:49:29)

Offline

#4 2021-10-05 14:35:54

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 6,817

Re: Two month calendar?

Silly me!  That's mine, below the TEXT line, tweaked from one I found years ago.  smile
def-cal I guess = default calendar - DUH!
How silly of me.

This will show 2 months:

 
${goto 12}SU MO ${color5}${time %b %Y}${color} FR SA
${goto 12}${color3}${execpi 1800 LAR=`date +%-d`; ncal -bh | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color5}&${color3}/' | sed ':a;N;$!ba;s/\n/\n${goto 12}/g'}${color}
${color5}${alignc}${membar 1,100}${color}
${goto 12}SU MO ${execpi 1800 date --date="1 month" | awk '{print $2" "$6}'} FR SA
${goto 12}${color3}${execpi 1800 ncal -bh -m `date +%m` -A1 -B-1 | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color5}&${color3}/' | sed ':a;N;$!ba;s/\n/\n${goto 12}/g'}${color}

2021-10-05_113326_S11.jpg
Colour, spacing, etc. will need tweaking  smile

Last edited by Sector11 (2021-10-08 19:45:42)


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

#5 2021-10-05 15:35:13

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 1,581

Re: Two month calendar?

^You are not stupid, my friend. You are wise!  angel

That won't work on him:

${goto 12}SU MO ${pre_exec date --date="1 month" | awk '{print $2" "$6}'} FR SA

He has to paint in because of 1.10

${goto 12}SU MO ${exec date --date="1 month" | awk '{print $2" "$6}'} FR SA

Offline

#6 2021-10-05 16:58:47

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 6,817

Re: Two month calendar?

I didn't say stupid, I said silly  smile

From v1,8 to v 1.10 is a simply change:

this

pre_exec

to this

execpi 86400

the 86400, updates once in a 24 hour period
- and is a number of seconds you chose.

I use the "pre_exec" because the 9 nonth vertical calendar layout is in a window.   Call it, look at it, "Yup 21 Dec is a Tuesday!" and then close it.

Old habit.


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

#7 2021-10-05 17:23:59

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 6,817

Re: Two month calendar?

And slightly OFF TOPIC a nice three month clock calendar

Tweaking from conky c1.9 to v1.10 may be required.

# pkill -xf "conky -c /media/5/Conky/S11_3_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 3 Month Calendar

# 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 250

minimum_size 480 0  # w|h
maximum_width 480

gap_x 00 	# l|r
gap_y 60 	# u|d

alignment tm
###  End Window Settings  ###
###  Font Settings  
# Use Xft (anti-aliased font and stuff)
use_xft yes
#xftfont monofur:bold:size=11
xftfont fantasque sans mono: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 5
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}${goto 15}${color1}88:88:88${goto 15}${color5}${time %T}${color}${font}
${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'}

OK --- later!


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

#8 2021-10-06 19:40:48

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 1,581

Re: Two month calendar?

^The customization of your 3 months calendar after version1.10 was simple.
I had to reduce the font size from 11 to 10.

Since here in EU the week begins, as it should, with Monday, I have the middle part (Oct.2021) with an earlier variant of yours  wink
exchanged. Only I do not want to succeed with the colors. The expired days, including today, are displayed.

See for yourself
Screenshot_20211006_213333.th.png


Here the complete configuration

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

--##  Begin Window Settings  ###
	own_window = true,
	own_window_type = 'normal',
	own_window_transparent = false,--yes
	own_window_hints = 'skip_taskbar,skip_pager',
	own_window_colour = '#000000',
	own_window_class = 'Conky',
	own_window_title = '3 Month Calendar',

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

	minimum_width = 480, minimum_height = 0,-- w|h
	maximum_width = 480,

	gap_x = 00,-- l|r
	gap_y = 00,-- u|d

	alignment = 'middle_right',--top_middle',
--##  End Window Settings  ###
--##  Font Settings  
-- Use Xft (anti-aliased font and stuff)
	use_xft = true,
--xftfont monofur:bold:size=11
	font = 'fantasque sans mono:bold:size=10',
-- 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 = 5,
	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 = [[
${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-1 -B1 | sed ':a;N;$!ba;s/\n/\n${goto 10}/g'}
${voffset -120}${goto 170}      ${color5}${time %b %Y}${color}
${alignc}${if_match ${time %u}==1}${color}Mo${color5} Di Mi Do Fr Sa So ${else}\
${if_match ${time %u}==2}${color5}Mo ${color}Di${color5} Mi Do Fr Sa So${else}\
${if_match ${time %u}==3}${color5}Mo Di ${color}Mi${color5} Do Fr Sa So${else}\
${if_match ${time %u}==4}${color5}Mo Di Mi ${color}Do${color5} Fr Sa So${else}\
${if_match ${time %u}==5}${color5}Mo Di Mi Do ${color}Fr${color5} Sa So${else}\
${if_match ${time %u}==6}${color5}Mo Di Mi Do Fr ${color}Sa${color5} So${else}\
${if_match ${time %u}==7}${color5}Mo Di Mi Do Fr Sa ${color}So${color5}${else}
${endif}${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'}
]];

Offline

#9 2021-10-07 09:44:48

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 1,581

Re: Two month calendar?

^Correct must be the section for the color: big_smile

${voffset -120}${goto 170}      ${color5}${time %b %Y}${color}
${alignc}${if_match ${time %u}==1}${color5}Mo${color} Di Mi Do Fr Sa So ${else}\
${if_match ${time %u}==2}${color}Mo ${color5}Di${color} Mi Do Fr Sa So${else}\
${if_match ${time %u}==3}${color}Mo Di ${color5}Mi${color} Do Fr Sa So${else}\
${if_match ${time %u}==4}${color}Mo Di Mi ${color5}Do${color} Fr Sa So${else}\
${if_match ${time %u}==5}${color}Mo Di Mi Do ${color5}Fr${color} Sa So${else}\
${if_match ${time %u}==6}${color}Mo Di Mi Do Fr ${color5}Sa${color} So${else}\
${if_match ${time %u}==7}${color}Mo Di Mi Do Fr Sa ${color5}So${color5}${else}
${endif}${endif}${endif}${endif}${endif}${endif}

and, it will look like this:
SuT2MFEt.png

Last edited by unklar (2021-10-07 17:32:23)

Offline

#10 2021-10-07 13:37:14

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 6,817

Re: Two month calendar?

You got it:  ${time  %↓↓}

The following conversion specifiers are recognized in the format string:

  • %a - abbreviated weekday name according to the current locale

  • %A - full weekday name according to the current locale

  • %b - abbreviated month name according to the current locale

  • %B - full month name according to the current locale

  • %c - preferred date and time representation for the current locale

  • %C - century number (the year divided by 100 and truncated to an integer, range 00 to 99)

  • %d - day of the month as a decimal number (range 01 to 31)

  • %D - same as %m/%d/%y

  • %e - day of the month as a decimal number, a single digit is preceded by a space (range ' 1' to '31')

  • %g - like %G, but without the century.

  • %G - The 4-digit year corresponding to the ISO week number (see %V). This has the same format and value as %Y, except that if the ISO week number belongs to the previous or next year, that year is used instead.

  • %h - same as %b

  • %H - hour as a decimal number using a 24-hour clock (range 00 to 23)

  • %I - hour as a decimal number using a 12-hour clock (range 01 to 12)

  • %j - day of the year as a decimal number (range 001 to 366)

  • %m - month as a decimal number (range 01 to 12)

  • %M - minute as a decimal number

  • %n - newline character

  • %p - either `am' or `pm' according to the given time value, or the corresponding strings for the current locale

  • %r - time in a.m. and p.m. notation

  • %R - time in 24 hour notation

  • %S - second as a decimal number

  • %t - tab character

  • %T - current time, equal to %H:%M:%S

  • %u - weekday as a decimal number [1,7], with 1 representing Monday


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

#11 2021-10-07 15:17:03

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 6,817

Re: Two month calendar?

Interesting that mine uses ${time %w} with 0=Sunday and 6=Saturday.

See the difference here

Also note you do not need to do the "if_match" part for the 7th day.  If it isn't any of the first 6 days of the week then it "HAS TO BE" the 7th day, this would eliminate one ${endif}

So this:

${if_match ${time %u}==7}${color}Mo Di Mi Do Fr Sa ${color5}So${color5}${else}
${endif}${endif}${endif}${endif}${endif}${endif}${endif}

would be

${color}Mo Di Mi Do Fr Sa ${color5}So${color5}${else}
${endif}${endif}${endif}${endif}${endif}${endif}

A minor tweak - not necessary and might save 1/1000000 of a second! and 0.0001% CPU resources. devil

Conky uses "date" variables with it's "time" command and there are a few more:

TEXT
${color9}${swapbar 0}${color}
  ${time %} ${color}→ % →${color7} literal %
  ${time %a} ${color}→ %a →${color7}  locale's abbreviated weekday name (e.g., Sun)
  ${time %A} ${color}→ %A →${color7}  locale's full weekday name (e.g., Sunday)
  ${time %b} ${color}→ %b →${color7}  locale's abbreviated month name (e.g., Jan)
  ${time %B} ${color}→ %B →${color7}  locale's full month name (e.g., January)
  ${time %c} ${color}→ %c →${color7}  locale's date and time (e.g., Thu Mar  3 23:05:25 2005)
  ${time %C} ${color}→ %C →${color7}  century; like %Y, except omit last two digits (e.g., 20)
  ${time %d} ${color}→ %d →${color7}  day of month (e.g., 01)
  ${time %D} ${color}→ %D →${color7}  date; same as %m/%d/%y
  ${time %e} ${color}→ %e →${color7}  day of month, space padded; same as %_d
  ${time %F} ${color}→ %F →${color7}  full date; same as %Y-%m-%d
  ${time %g} ${color}→ %g →${color7}  last two digits of year of ISO week number (see %G)
  ${time %G} ${color}→ %G →${color7}  year of ISO week number (see %V); normally useful only with %V
  ${time %h} ${color}→ %h →${color7}  same as %b
  ${time %H} ${color}→ %H →${color7}  hour (00..23)
  ${time %I} ${color}→ %I →${color7}  hour (01..12)
  ${time %j} ${color}→ %j →${color7}  day of year (001..366)
  ${time %k} ${color}→ %k →${color7}  hour, space padded ( 0..23); same as %_H
  ${time %l} ${color}→ %l →${color7}  hour, space padded ( 1..12); same as %_I
  ${time %m} ${color}→ %m →${color7}  month (01..12)
  ${time %M} ${color}→ %M →${color7}  minute (00..59)
  ${time %n} ${color}→↑ %n ↑→${color7}  a newline
  ${time %N} ${color}→ %N →${color7}  nanoseconds (000000000..999999999)
  ${time %p} ${color}→ %p →${color7}  locale's equivalent of either AM or PM; blank if not known
  ${time %P} ${color}→ %P →${color7}  like %p, but lower case
  ${time %q} ${color}→ %q →${color7}  quarter of year (1..4)
  ${time %r} ${color}→ %r →${color7}  locale's 12-hour clock time (e.g., 11:11:04 PM)
  ${time %R} ${color}→ %R →${color7}  24-hour hour and minute; same as %H:%M
  ${time %s} ${color}→ %s →${color7}  seconds since 1970-01-01 00:00:00 UTC
  ${time %S} ${color}→ %S →${color7}  second (00..60)
  ${time %t} ${color}→ %t →${color7}  a tab
  ${time %T} ${color}→ %T →${color7}  time; same as %H:%M:%S
  ${time %u} ${color}→ %u →${color7}  day of week (1..7); 1 is Monday
  ${time %U} ${color}→ %U →${color7}  week number of year, with Sunday as first day of week (00..53)
  ${time %V} ${color}→ %V →${color7}  ISO week number, with Monday as first day of week (01..53)
  ${time %w} ${color}→ %w →${color7}  day of week (0..6); 0 is Sunday
  ${time %W} ${color}→ %W →${color7}  week number of year, with Monday as first day of week (00..53)
  ${time %x} ${color}→ %x →${color7}  locale's date representation (e.g., 12/31/99)
  ${time %X} ${color}→ %X →${color7}  locale's time representation (e.g., 23:13:48)
  ${time %y} ${color}→ %y →${color7}  last two digits of year (00..99)
  ${time %Y} ${color}→ %Y →${color7}  year
  ${time %z} ${color}→ %z →${color7}  +hhmm numeric time zone (e.g., -0400)
  ${time %:z} ${color}→ %:z →${color7}  +hh:mm numeric time zone (e.g., -04:00)
  ${time %::z} ${color}→ %::z →${color7}  +hh:mm:ss numeric time zone (e.g., -04:00:00)
  ${time %:::z} ${color}→ %:::z →${color7}  numeric time zone with : to necessary precision (e.g., -04, +05:30)
  ${time %Z} ${color}→ %Z →${color7}  alphabetic time zone abbreviation (e.g., EDT)
${font}${color9}${swapbar 0}${color}

Notice the commands with ":" do not work.

See it here!


My text file that explains it in a way it is easier to read:

Conky: ${time %?} or ${time %? %? %?}

Time
====
%H 	Two digit representation of the hour in 24-hour format 	00 through 23
%I 	Two digit representation of the hour in 12-hour format 	01 through 12
%l   (lower-case 'L') Hour in 12-hour format, with a space preceeding single digits 1 through 12

%M 	Two digit representation of the minute 	00 through 59

%p 	UPPER-CASE 'AM' or 'PM' based on the given time 	Example: AM for 00:31, PM for 22:23
%P 	lower-case 'am' or 'pm' based on the given time 	Example: am for 00:31, pm for 22:23

%r 	Same as "%I:%M:%S %p" 	Example: 09:34:17 PM for 21:34:17
%R 	Same as "%H:%M" 	Example: 00:35 for 12:35 AM, 16:44 for 4:44 PM
%S 	Two digit representation of the second 	00 through 59
%T 	Same as "%H:%M:%S" 	Example: 21:34:17 for 09:34:17 PM
-------
%X 	Preferred time representation based on locale, without the date 	Example: 03:59:16 or 15:59:16
-------
%z 	Either the time zone offset from UTC or the abbreviation (depends on operating system) 	Example: -0500 or EST for Eastern Time
%Z 	The time zone offset/abbreviation option NOT given by %z (depends on operating system) 	Example: -0500 or EST for Eastern Time

Day
===
%a 	An abbreviated textual representation of the day 	Sun through Sat
%A 	A full textual representation of the day 	Sunday through Saturday
%d 	Two-digit day of the month (with leading zeros) 	01 to 31
%e 	Day of the month, with a space preceding single digits 	1 to 31
%j 	Day of the year, 3 digits with leading zeros 	001 to 366
%u 	ISO-8601 numeric representation of the day of the week 	1 (for Monday) though 7 (for Sunday)
%w 	Numeric representation of the day of the week 	0 (for Sunday) through 6 (for Saturday)

Month
=====
%b 	Abbreviated month name, based on the locale 	Jan through Dec
%B 	Full month name, based on the locale 	January through December
%h 	Abbreviated month name, based on the locale (an alias of %b) 	Jan through Dec
%m 	Two digit representation of the month (with leading zeros) 	01 to 12

Year
====
%g 	Two digit representation of the year going by ISO-8601:1988 standards (see Week: %V) 	Example: 09 for the week of January 6, 2009
%G 	The full four-digit version of %g 	Example: 2008 for the week of January 3, 2009
%y 	Two digit representation of the year 	Example: 09 for 2009, 79 for 1979
%Y 	Four digit representation for the year 	Example: 2038

Century
=======
%C 	Two digit representation of the century (year divided by 100, truncated to an integer) 	19 for the 20th

Week
====
%U 	Week number of the given year, starting with the first Sunday as the first week 13 (for the 13th full week of the year)
%V 	ISO-8601:1988 week number of the given year, starting with the first week of the year with at least 4 weekdays, with Monday being the start of the week
 	01 through 53 (where 53 accounts for an overlapping week)
%W 	A numeric representation of the week of the year, starting with the first Monday as the first week
 	46 (for the 46th week of the year beginning with a Monday)

Time and Date Stamps
====================
%c 	Preferred date and time stamp based on local 	Example: Tue Feb 5 00:45:10 2009 for February 4, 2009 at 12:45:10 AM
%D 	Same as "%m/%d/%y" 	Example: 02/05/09 for February 5, 2009
%F 	Same as "%Y-%m-%d" (commonly used in database datestamps) 	Example: 2009-02-05 for February 5, 2009
%s 	Unix Epoch Time timestamp (same as the time() function) 	Example: 305815200 for September 10, 1979 08:40:00 AM
%x 	Preferred date representation based on locale, without the time 	Example: 02/05/09 for February 5, 2009

Miscellaneous
=============
%n 	A newline character ("\n") 	---
%t 	A Tab character ("\t") 	---
%% 	A literal percentage character ("%") 	---

The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

#12 2021-10-07 17:31:41

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 1,581

Re: Two month calendar?

^^There I have done something again my good friend  big_smile
I see you are fully in your element.

That's interesting about the 7th endif. I did not know that.
I'll correct that.
I know everything else, because you thankfully sent it to me years ago. I always write from you.  wink cool

We have to stop here because otherwise the Thread creator will get all confused. He wanted a 2 month calendar...    smile

Offline

#13 2021-10-08 19:47:30

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 6,817

Re: Two month calendar?

Yes we must stop Poor jeffreyC might miss the 2 month calendar.

True, I sent you everything  smile


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

Board footer

Powered by FluxBB