Code: Select all
en_AU : English locale for Australia
en_GB : English locale for Britain
en_NZ : English locale for New Zealand
es_NI : Spanish locale for Nicaragua
es_PE : Spanish locale for Peru
es_VE : Spanish locale for Venezuela
he_IL : Hebrew locale for Israel
is_IS : Icelandic locale for Iceland
ja_JP : Japanese language locale for Japan
ko_KR : Korean locale for Republic of Korea
tr_TR : Turkish locale for Turkey
zh_CN : Chinese locale for Peoples Republic of China
zh_TW : Chinese locale for Taiwan R.O.C.
So I had adjusted the pmfix to not rely simply on existence on a "PM/AM"-definition,
but check the full "date-time" definition for existence of pm/am and 12h, resp.
Can somebody check for those locale above the time and am/pm display is now fixed.
Do place both below scripts into
~/.conky/MX-Cowon/ with the mentioned file names.
Below a fixed version of our current default Conky MX-Cowon_more_sys_small:
This:
~/.conky/MX-Cowon/MX-Cowon_more_sys_small
Code: Select all
######################
# - Conky settings - #
#####################
update_interval 1
total_run_times 0
net_avg_samples 1
cpu_avg_samples 1
imlib_cache_size 0
double_buffer yes
no_buffers yes
#####################
# - Text settings - #
#####################
use_xft yes
xftfont Dinreg:size=100
override_utf8_locale yes
text_buffer_size 2048
xftalpha 0.9
#############################
# - Window specifications - #
#############################
own_window_class Conky
own_window yes
own_window_type conky
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
#own_window_argb_visual yes
#own_window_argb_value 100
alignment top_right
gap_x 40
gap_y 40
minimum_size 220 220
#########################
# - Graphics settings - #
#########################
draw_shades no
default_color 025101
default_shade_color 1d1d1d
color0 ffffff
color1 0f0c03
color2 0f225d
color3 1c1911
#lua_load ~/.conky/conkybg.lua
#lua_draw_hook_pre conky_draw_bg
own_window_argb_value 0
own_window_argb_visual yes
own_window_colour 000000
lua_load ~/.conky/MX-Cowon/conky_hours.lua
TEXT
${voffset -20}${lua hours}
${color2}${offset 40}${voffset -100}${time %M}
${voffset -140}${offset 10}${font Roboto-Light:bold:size=12}${color2}${time %A} ${offset 10}${color2}${time %B %d}
${offset 150}${voffset -175}${font Roboto-Light:size=12}${color2}${lua AM_PM}
#system
${offset 0}${voffset 160}${font Roboto-Light:pixelsize=12}${offset 14}${color3}hdd ${offset 4}${color4}${fs_used_perc /}%${offset 4}${color3} mem ${offset 4}${color4}${memperc}%${offset 4} ${color3}cpu ${offset 4}${color4}${cpu cpu0}%
~/.conky/MX-Cowon/conky_hours.lua
Code: Select all
function has_ampm()
local handle = io.popen("locale -k d_t_fmt | grep -sqo -E '%r|%p|%I' && echo yes || echo no")
local output = handle:read("*l")
handle:close()
return output
end
if has_ampm() == "yes" then
ampm = true
else
ampm = false
end
function conky_hours()
if ampm then
return os.date("%I")
else
return os.date("%H")
end
end
function conky_ampm()
if ampm then
return os.date("%P")
else
return ''
end
end
function conky_AMPM()
if ampm then
return os.date("%p")
else
return ''
end
end
function conky_am_pm()
return conky_ampm()
end
function conky_AM_PM()
return conky_AMPM()
end
function conky_lang()
return os.getenv("LANG")
end