Voici un petit conky qui affiche la date et l'heure mais sous forme écrite (par exemple vingt heure moins vingt).
J'ai repris un script de Sector11,
http://crunchbang.org/forums/viewtopic.php?id=16909&p=332, post #8287 et suivant.
Un petit aperçu :
L'heure est à 5 minutes près, mais on peut modifier le script pour que cela soit plus précis.
Le conky:
background no
use_xft yes
xftfont MgOpen Modata L:size=10:bold
update_interval 1
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent no
own_window_argb_value 150
own_window_argb_visual yes
own_window_hints undecorate,skip_taskbar,skip_pager,below
double_buffer yes
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders yes
default_color white
alignment top_right
minimum_size 600 0
maximum_width 600
#minimum_size 230 0
#maximum_width 230
gap_x 12
gap_y 250
no_buffers yes
uppercase no
cpu_avg_samples 2
net_avg_samples 2
override_utf8_locale yes
use_spacer right
text_buffer_size 1024
color0 00f5ff #bleu turquoise
color1 cf1c00 #rouge brique
color2 cd5555 #rose foncé
color3 11B3F8 #bleu ciel
color4 0000ff #bleu foncé
color5 176e88 #bleu-gris
color6 ff4500 #orange foncé
color7 00FF00 #vert tendre
color8 FF8000 #orange
color9 FF0000 #rouge
TEXT
${alignc}${execpi 30 /home/dominique/test/talktime_fr.sh}
${alignc}${if_match ${time %u} == 1}lundi${else}\
${if_match ${time %u} == 2}mardi${else}\
${if_match ${time %u} == 3}mercredi${else}\
${if_match ${time %u} == 4}jeudi${else}\
${if_match ${time %u} == 5}vendredi${else}\
${if_match ${time %u} == 6}samedi${else}\
dimanche${endif}${endif}${endif}${endif}${endif}${endif} \
${if_match ${time %e} <= 9}${time %e}${else}${time %d}${endif} \
${if_match ${time %m} == 01}janvier${else}\
${if_match ${time %m} == 02}février${else}\
${if_match ${time %m} == 03}mars${else}\
${if_match ${time %m} == 04}avril${else}\
${if_match ${time %m} == 05}mai${else}\
${if_match ${time %m} == 06}juin${else}\
${if_match ${time %m} == 07}juillet${else}\
${if_match ${time %m} == 08}août${else}\
${if_match ${time %m} == 09}septembre${else}\
${if_match ${time %m} == 10}octobre${else}\
${if_match ${time %m} == 11}novembre${else}\
décembre${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif} \
${time %Y}
le script : talktime_fr.sh
#!/bin/sh
# DC's english time 07/07/09
# Tweaked by Sector11
# Converted to French by Sector11 with help from ragamatrix
# More French help by: chepioq
# find current time
t_hr=$(date +%-H)
#echo $t_hr
t_min=$(date +%-M)
#echo $t_min
#t_hr=9 #tester
#t_min=17 #tester
# is it time to ONE ( the only wierd case)
if [ $t_hr -eq 12 ] && [ $t_min -gt 32 ] ;then
# what minute is it
case $t_min in
33|34|35|36|37)
echo une heure moins vingt-cinq ;;
38|39|40|41|42)
echo une heure moins vingt ;;
43|44|45|46|47)
echo une heure moins le quart ;;
48|49|50|51|52)
echo une heure moins dix ;;
53|54|55|56|57|58|59)
echo une heure moins cinq ;;
58|59)
echo presque une heure
esac
exit
fi
#echo $t_hr
#add one hour for the "to" hour
if [ $t_min -gt 32 ] ; then
t_hr=$(($t_hr + 1)) # override t_hr
fi
#echo $t_hr
# find out what hour it is and change into text
case $t_hr in
0)
t_hr_text=minuit ;;
1)
t_hr_text="une heure" ;;
2)
t_hr_text="deux heure" ;;
3)
t_hr_text="trois heure" ;;
4)
t_hr_text="quatre heure" ;;
5)
t_hr_text="cinq heure" ;;
6)
t_hr_text="six heure" ;;
7)
t_hr_text="sept heure" ;;
8)
t_hr_text="huit heure" ;;
9)
t_hr_text="neuf heure" ;;
10)
t_hr_text="dix heure" ;;
11)
t_hr_text="onze heure" ;;
12)
t_hr_text=midi ;;
13)
t_hr_text="treize heure" ;;
14)
t_hr_text="quatorze heure" ;;
15)
t_hr_text="quinze heure" ;;
16)
t_hr_text="seize heure" ;;
17)
t_hr_text="dix-sept heure" ;;
18)
t_hr_text="dix-huit heure" ;;
19)
t_hr_text="dix-neuf heure" ;;
20)
t_hr_text="vingt heure" ;;
21)
t_hr_text="vingt et une heure" ;;
22)
t_hr_text="vingt-deux heure" ;;
23)
t_hr_text="vingt-trois heure" ;;
esac
# what minute is it
case $t_min in
0|1|2)
echo $t_hr_text ;;
3|4|5|6|7)
echo $t_hr_text cinq ;;
8|9|10|11|12)
echo $t_hr_text dix ;;
13|14|15|16|17)
echo $t_hr_text et quart ;;
18|19|20|21|22)
echo $t_hr_text vingt ;;
23|24|25|26|27)
echo $t_hr_text vingt-cinq;;
28|29|30|31|32)
echo $t_hr_text et demie ;;
33|34|35|36|37)
echo $t_hr_text moins vingt-cinq ;;
38|39|40|41|42)
echo $t_hr_text moins vingt ;;
43|44|45|46|47)
echo $t_hr_text moins le quart ;;
48|49|50|51|52)
echo $t_hr_text moins dix ;;
53|54|55|56|57)
echo $t_hr_text moins cinq ;;
58|59)
echo ± $t_hr_text ;;
esac
Le 21/04/2015:
--correction d'un léger bug qui empêchait l'affichage des heures de 0 à 9.