You are not logged in.

#1 2019-08-08 16:42:32

timberwolf
Member
Registered: 2017-03-31
Posts: 5

[SOLVED] conky - calendar date does not display properly

A fews day ago, I install "helium-5-amd64.hybrid.iso" newly.

I uses calendar in cony setting files. but date order is wired unlike previous version.
Let me know what's problem?

OiJMJom.png

code: BL-Def-Cal.conkyrc

--[[ 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 = '678b8b',-- 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 = [[
${alignc}${color0}${time %X}
${goto 28}${color}SU MO ${color0}${time %b %Y}${color} FR SA
${goto 28}${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 28}/g'}${color}${font}

${color}${alignc}S Y S T E M    I N F O
${hr}
Host:${alignr}${nodename}
Uptime:${alignr}${uptime}
UTC:${alignr}${utime %H:%M}

${goto 60}Used${alignr}Size
Root${goto 60}${fs_used /}${alignr}${fs_size /}
Home${goto 60}${fs_used /home}${alignr}${fs_size /home}

${goto 60}MEM${alignr}MAX
RAM${goto 60}${mem}${alignr}${memmax}
Swap${goto 60}${swap}${alignr}${swapmax}

CPU:${goto 60}Used${alignr}GHz
Avg${goto 60}${if_match ${cpu cpu0}<10}  ${cpu cpu0}\
${else}${if_match ${cpu cpu0}<100} ${cpu cpu0}\
${else}${cpu cpu0}${endif}${endif}%${alignr}${freq_g}

${alignc}S H O R T C U T    K E Y S
${hr}
[Alt] + F2${alignr}Run Dialog
[Alt] + F3${alignr}Alt Menu
[S] + Space${alignr}Main Menu
[S] + Tab${alignr}Client Menu
[S] + t${alignr}Terminal
[S] + f${alignr}File Manager
[S] + e${alignr}Editor
[S] + m${alignr}Media Player
[S] + w${alignr}Web Browser
[S] + h${alignr}Task Manager
[S] + l${alignr}Lock Screen
[S] + v${alignr}Volume Control
[S] + x${alignr}Logout
[PrtSc]${alignr}Screenshot
]];

Last edited by timberwolf (2019-08-15 13:11:47)

Offline

#2 2019-08-08 20:22:45

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

Re: [SOLVED] conky - calendar date does not display properly

The Conky works correctly here. This applies to the original as well as your code published here.

What is in your files
~/.config/openbox/autostart
and
~/.config/conky/conky-sessionfile.

maybe you'll double start him?
what does the terminal show with the command

ncal -bh

Last edited by unklar (2019-08-08 20:54:18)

Offline

#3 2019-08-09 05:36:36

ohnonot
...again
Registered: 2015-09-29
Posts: 3,909
Website

Re: [SOLVED] conky - calendar date does not display properly

timberwolf wrote:

A fews day ago, I install "helium-5-amd64.hybrid.iso" newly.

I uses calendar in cony setting files. but date order is wired unlike previous version.
Let me know what's problem?

Use a different font.
A monospaced latin font - and one that actually exists on your system.

Offline

#4 2019-08-09 10:48:27

timberwolf
Member
Registered: 2017-03-31
Posts: 5

Re: [SOLVED] conky - calendar date does not display properly

unklar wrote:

The Conky works correctly here. This applies to the original as well as your code published here.

What is in your files
~/.config/openbox/autostart
and
~/.config/conky/conky-sessionfile.

maybe you'll double start him?
what does the terminal show with the command

I don't understand "double", What does mean?

then command 'ncal -bh' appear normally.
bpglrdv.png

Last edited by timberwolf (2019-08-09 10:56:59)

Offline

#5 2019-08-09 11:44:57

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

Re: [SOLVED] conky - calendar date does not display properly

timberwolf wrote:

then command 'ncal -bh' appear normally.

Are those Korean, Chinese or Japanese characters?

I'm sorry, I can't help you. ops You should wait for someone who is familiar with it...

Offline

#6 2019-08-09 13:41:35

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

Re: [SOLVED] conky - calendar date does not display properly

monospace is aliased to another monofont, not sure which one, but something is messing up.

Do as ohnonot suggests use a mono font you have on your system

Test with a simple line near the bottom of the conky that just uses the ncal command:

Ezample:

[S] + v${alignr}Volume Control
[S] + x${alignr}Logout
[PrtSc]${alignr}Screenshot

${font Fantasque Sans Mono:bold:size=9}${execpi 3600 ncal -bh}${font}
]];

Keep us posted.


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: d67 Kernel: 4.9.0-9-amd64 x86_64 (64 bit gcc: 6.3.0)
Desktop: Openbox 3.6.1 Distro: Debian GNU/Linux 9 (stretch)

Offline

#7 2019-08-09 17:47:52

ohnonot
...again
Registered: 2015-09-29
Posts: 3,909
Website

Re: [SOLVED] conky - calendar date does not display properly

You probably need to tell conky to use default US locale, because I don't think this script snippet can deal width double-width Asian fonts.
try

LC_ALL=C conky -c /your/conky/config

Offline

#8 2019-08-09 22:02:45

timberwolf
Member
Registered: 2017-03-31
Posts: 5

Re: [SOLVED] conky - calendar date does not display properly

Sector11 wrote:

Test with a simple line near the bottom of the conky that just uses the ncal command:

Ezample:

[S] + v${alignr}Volume Control
[S] + x${alignr}Logout
[PrtSc]${alignr}Screenshot

${font Fantasque Sans Mono:bold:size=9}${execpi 3600 ncal -bh}${font}
]];

Keep us posted.

It's no of use.
I used korean font NanumGothic additionally, but it's same error.

7GRjYuP.png

Offline

#9 2019-08-09 22:19:12

timberwolf
Member
Registered: 2017-03-31
Posts: 5

Re: [SOLVED] conky - calendar date does not display properly

ohnonot wrote:
LC_ALL=C conky -c /your/conky/config

Edit ~/.config/conky/conky-sessionfile with support.

It appear normally smile
but today's highlight  is missing.

7SIbceR.png

Last edited by timberwolf (2019-08-09 22:32:02)

Offline

#10 2019-08-10 15:11:41

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

Re: [SOLVED] conky - calendar date does not display properly

Getting there....  Well done ohnonot


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: d67 Kernel: 4.9.0-9-amd64 x86_64 (64 bit gcc: 6.3.0)
Desktop: Openbox 3.6.1 Distro: Debian GNU/Linux 9 (stretch)

Offline

#11 2019-08-11 07:21:07

ohnonot
...again
Registered: 2015-09-29
Posts: 3,909
Website

Re: [SOLVED] conky - calendar date does not display properly

OK, do you want some Korean, some Western letters or not?
If yes, post #8 (*) looks OK, you just need a monospaced font - one that supports Korean also! Or different fonts for the Western/Korean bits.

Re post #9: Are you saying that with "LC_ALL=C" highlights are missing, but without it you see the highlights, with the exact same conky code?
Please show us that conky code.


(*) There are TWO calendars there. Why. Please be precise when communicating with the forums.

Last edited by ohnonot (2019-08-11 07:22:20)

Offline

#12 2019-08-14 10:04:10

timberwolf
Member
Registered: 2017-03-31
Posts: 5

Re: [SOLVED] conky - calendar date does not display properly

ohnonot wrote:

Re post #9: Are you saying that with "LC_ALL=C" highlights are missing, but without it you see the highlights, with the exact same conky code?
Please show us that conky code.


(*) There are TWO calendars there. Why. Please be precise when communicating with the forums.

Right,
At first, To help understand that introduce bunselanb original code(BL-Def-Cal.conkyrc).
I use following code.
then highlight issue is solved by reboot. maybe conky update error occurred.

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

 man conky

 ------------------------------
 BunsenLabs conky 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

 ------------------------------
 BunsenLabs conky scripts help
 Openbox Menu/Preferences/Conky/Conky Manager Help

 If there are one or more conkys running, it is possible to kill one conky with
 the following command, IF you used what is between the quotes to start the conky, e.g.:
 pkill -xf "conky -q -c $HOME/.config/conky/BL-Default.conkyrc"
]]


conky.config = {

--  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 Conky',

-- ARGB can be used for real transparency
--own_window_argb_visual = true, -- Options: true|false

-- NOTE that a composite manager is required for real transparency and ARGB will not
-- work as desired (in most cases) in conjunction with 'own_window_type override'.
-- Use with: own_window_type = 'normal',
-- Use with: own_window_transparent = false,

-- When ARGB visuals are enabled, use the following to modify the alpha value. Valid
-- range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
--own_window_argb_value = 150,

    minimum_width = 200, minimum_height = 0,-- width | height
    maximum_width = 200,

    gap_x = 20,-- left | right
    gap_y = 45,-- up | down

    alignment = 'top_right',
--  End Window Settings


--  Font Settings
-- Use Xft (anti-aliased font and stuff)
    use_xft = true,

--font = 'Liberation Mono:bold:size=10',
--font = 'Liberation Sans:size=10',
    font = 'Sans-serif:size=10',

-- Alpha of Xft font. Must be a value at or between 1 and 0
    xftalpha = 1,

-- Force UTF8? requires XFT
    override_utf8_locale = true,

    uppercase = false,
--  End Font Settings


--  Color Settings
    draw_shades = false,
    default_shade_color = '000000',

    draw_outline = false,-- amplifies text if true
    default_outline_color = '000000',

    default_color = '678b8b', -- Beam green
--default_color = '656667', -- Waldorf original colour
--default_color = '7a7a7a', -- Flame  & BunsenLabs Grey
--default_color = '929292', -- BunsenLabs Grey
--default_color = 'C0C0C0', -- BunsenLabs 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 = 'C0C0C0',-- Silver
--  End Color Settings


--  Borders Section
    draw_borders = false,
-- 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 = false,
--default_graph_height = 15,
--default_graph_width = 40,
--  End Borders Section


--  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',

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

-- change GiB to G and MiB to M
    short_units = true,

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

-- 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 = 'Celsius',

-- Update interval in seconds
    update_interval = 1,

--  End Miscellaneous Section
};


conky.text = [[
############
# Calendar #
############
${alignc}${font Mono:size=14}${color0}${time %b %Y}${color}
${font Mono:size=12}${goto 5}${color}SU MO TU We Th FR SA
${goto 5}${color}${execpi 1800 LAR=`date +%-d`; ncal -bh | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color0}&${color}/' | sed ':a;N;$!ba;s/\n/\n${goto 5}/g'}${color}${font}


#################
# MISC SYS INFO #
#################
${color}S Y S T E M    I N F O
${hr}
Host:${alignr}${nodename}
Uptime:${alignr}${uptime}
# localtime ##UTC:${alignr}${utime %H:%M}##
KST:${alignr}${tztime Asia/Seoul %H:%M}

H D D${goto 80}Free${alignr}Size
Root${goto 80}${fs_free /}${alignr}${fs_bar 6,75 /}
DATA${goto 80}${fs_free /media/lovelain/DATA}${alignr}${fs_bar 6,75 /media/lovelain/DATA}
RAID${goto 80}${fs_free /DATA_RAID}${alignr}${fs_bar 6,75 /DATA_RAID}

${goto 80}MEM${alignr}MAX
RAM${goto 80}${mem}${alignr}${memmax}
Swap${goto 80}${swap}${alignr}${swapmax}

CPU:${goto 80}Used${alignr}GHz
Avg${goto 80}${if_match ${cpu cpu0}<10}  ${cpu cpu0}\
${else}${if_match ${cpu cpu0}<100} ${cpu cpu0}\
${else}${cpu cpu0}${endif}${endif}%${alignr}${freq_g}

#
# Weather information from openweathermap.org can be displayed in conky by
# using the script $HOME/.config/conky/scripts/bunsenweather.sh. The openweathermap
# service requires registration in order to receive an API Key, which has to be
# added to bunsenweather.sh. For further info see this script and the following thread:
# https://forums.bunsenlabs.org/viewtopic.php?id=2060
#
# Calling bunsenweather.sh from conky works by using
# ${execpi <t> /path/to/bunsenweather.sh "yourlocation"}
# where <t> is the update interval. If "yourlocation" is not defined, the script
# sets geolocation based on your IP adress using the website ipinfo.io.
#
W E A T H E R
${hr}
${execpi 600 $HOME/.config/conky/scripts/bunsenweather.sh}

S H O R T C U T    K E Y S
${hr}
Alt + F2${alignr}Run Dialog
Alt + F3${alignr}Alt Menu
Super${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
]];

CWb38f7.png

Last edited by timberwolf (2019-08-14 10:09:16)

Offline

#13 2019-08-14 17:51:09

ohnonot
...again
Registered: 2015-09-29
Posts: 3,909
Website

Re: [SOLVED] conky - calendar date does not display properly

Great! :thumbs_up:
Please mark your thread SOLVED by editing the first post.

Offline

Board footer

Powered by FluxBB