2023-11-19 17:39:54 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
## Read config file or create/update
|
|
|
|
config_filename=~/.config/$(basename "${0}")
|
|
|
|
test -f "${config_filename}" && . "${config_filename}" || echo "# Fichier de configuration créé $(date +%c)" | tee "${config_filename}"
|
|
|
|
|
|
|
|
### edit directory path music background
|
|
|
|
if [[ -z "${jingle_tophoraire+set}" ]]; then
|
|
|
|
jingle_tophoraire=$(xdg-user-dir MUSIC)/jingles/t1.top_h_hkc.mp3
|
|
|
|
echo "jingle_tophaire=${jingle_tophoraire}" | tee -a "${config_filename}"
|
2023-11-19 17:42:06 +01:00
|
|
|
fi
|
2023-11-19 17:39:54 +01:00
|
|
|
|
|
|
|
|
|
|
|
# Chemin vers le jingle MP3
|
|
|
|
jingle_mp3="/home/cedric24c/Musique/jingles/t1.top_h_hkc.mp3"
|
|
|
|
|
|
|
|
# Lecture du jingle en arrière-plan
|
|
|
|
play "$jingle_mp3" >/dev/null 2>&1 &
|
|
|
|
|
|
|
|
# Annonce de l'heure actuelle en utilisant espeak-ng
|
|
|
|
heure_actuelle=$(date +'%k')
|
|
|
|
message_annonce="top horaire. $heure_actuelle heures"
|
|
|
|
espeak-ng "$message_annonce" -v fr+f5 -p 25 -s 135
|
|
|
|
|
|
|
|
espeak-ng "top horaire. $(date +\'%k\') heures" -v fr+f5 -p 25 -s 135
|