Page 1 of 1

looking for small time display edit in conky.conf file please [SOLVED]

Posted: Fri Apr 12, 2024 11:01 am
by Logansfury
Hello everyone,

I have a workspace that is employing the Victor Conky. This conky displays the time of day with the following line of bash text:

${voffset -11}${goto 30}${color1}${font Neon 80s:style=bold:size=30}${time %I:%M%P}${voffset 22}${color1}${goto 218}${font Neon 80s:style=Bold:size=14}CPU

This is fine, except that it is showing a 0 preceding the number from 1 to 9 o' clock AM or PM.

Is it possible to edit the above line in the conky format/syntax to eliminate the 0 from in front of the time display?

Thanks for reading :)

Logan

Re: looking for small time display edit in conky.conf file please

Posted: Fri Apr 12, 2024 4:49 pm
by Koentje
Replace
${time %I:%M%P}

with
${exec date +'%I:%M%P' | sed 's/^0//g'}

Re: looking for small time display edit in conky.conf file please

Posted: Fri Apr 12, 2024 4:53 pm
by Logansfury
Koentje wrote: Fri Apr 12, 2024 4:49 pm Replace
${time %I:%M%P}

with
${exec date +'%I:%M%P' | sed 's/^0//g'}
That is exactly what I needed, the display looks much better!

Thank you Koentje :)

Re: looking for small time display edit in conky.conf file please [SOLVED]

Posted: Wed Apr 17, 2024 8:48 am
by trinidad

Code: Select all

${alignc}${font Noto Sans:size=11}${color}Chicago Illinois ${color}${time %H : %M}
${alignc}${color}${time %A, }${time %e %B %Y}
${alignc}${color1}Auckland New Zealand  ${color}${tztime /usr/share/zoneinfo/Pacific/Auckland %H : %M}
${alignc}${color}${tztime /usr/share/zoneinfo/Pacific/Auckland %A, %e %B %Y}
I use this to keep track of the time difference between NZ and the US. I leave the 24hr format so I know the hours difference and don't wake people up in the middle of the night.

https://dbts-analytics.com/new24stff2.html

TC

Re: looking for small time display edit in conky.conf file please [SOLVED]

Posted: Wed Apr 17, 2024 8:51 am
by Logansfury
trinidad wrote: Wed Apr 17, 2024 8:48 am

Code: Select all

${alignc}${font Noto Sans:size=11}${color}Chicago Illinois ${color}${time %H : %M}
${alignc}${color}${time %A, }${time %e %B %Y}
${alignc}${color1}Auckland New Zealand  ${color}${tztime /usr/share/zoneinfo/Pacific/Auckland %H : %M}
${alignc}${color}${tztime /usr/share/zoneinfo/Pacific/Auckland %A, %e %B %Y}
I use this to keep track of the time difference between NZ and the US. I leave the 24hr format so I know the hours difference and don't wake people up in the middle of the night.

Image

TC
That is an excellent idea, tracking multiple time zones! Thank you for sharing the code. Can you repost the URL to your image, it shows as broken link to me.

EDIT: I see you just fixed the URL, thanks! Very nice looking Linux GUI!