Sonorilo 是我用來在自己的 mac mini 上播放「鐘聲」的工具。鐘聲就像學校或工廠的鐘聲,能讓你在居家辦公時也能遵守固定的作息。
Sonorilo 是一個 Esperanto 詞,他的發音是 /sonoˈrilo/,他是由兩個詞組成的:「sonor-」(聲音)和「-ilo」(工具)。
Sonorilo estas ilo por ludigi "sonorilojn" en mia Mac Mini. Sonoriloj similas al tiuj en lernejoj aŭ fabrikoj, kaj ili helpas vin sekvi regulan tagordon dum hejma laboro.
Sonorilo estas Esperanto-vorto, kies prononco estas /sonoˈrilo/, kaj ĝi konsistas el du vortoj: "sonor-" (sono) kaj "-ilo" (ilo). Se vi povas regi ĉi tiun frazon, vi jam estas bona Esperanto-parolanto!
Sonorilo is a tool I use to play "bells" on my Mac Mini. Bells are like those in schools or factories, helping you maintain a regular schedule while working from home.
Sonorilo is an Esperanto word, pronounced /sonoˈrilo/, and it consists of two words: "sonor-" (sound) and "-ilo" (tool).
Sonorilo は、Mac Mini で「ベル」を再生するためのツールです。ベルは学校や工場のベルのように、在宅勤務中も規則的なスケジュールを維持するのに役立ちます。
Sonorilo はエスペラント語の単語で、発音は /sonoˈrilo/ で、2つの単語「sonor-」(音)と「-ilo」(ツール)から構成されています。
- 📅 Customizable Scheduling: Uses a YAML configuration file to define sound alerts and playback times.\
- 🕰 Flexible Timing: Uses
launchdto check the schedule every minute, ensuring precise sound playback.
-
Clone the repository:
git clone https://github.com/binotaliu/sonorilo.git
-
Install Deno (if not already installed):
curl -fsSL https://deno.land/install.sh | sh -
Create a YAML configuration file: Define your schedule in
schedule.yamlwith the desired sound files, times, and playback options. Example:- time: "9:30" sound: "westminster-chimes.m4a" type: "normal" volume: 7 - time: "10:00" sound: "amaryllis.opus" type: "bluetooth"
Sounds live in
sounds/directory. You can put anything that ffmpeg supports. -
Configure launchd: Copy
org.binota.sonorilo.plistto~/Library/LaunchAgents/and adjust paths and times as needed. -
Load the
launchdjob:launchctl load ~/Library/LaunchAgents/org.binota.sonorilo.plist
The schedule.yaml file defines each scheduled task. Each entry includes:
time: The time to play the sound, formatted asHH:MM.sound: The filename of the sound file to play (stored in thesounds/folder).volume(optional): Set volume level (0-100) fornormalplayback.
- time: "9:30"
sound: "westminster-chimes.ogg"
volume: 7
- time: "10:00"
sound: "amaryllis.ogg"
type: "bluetooth"The Deno script mod.js reads the schedule.yaml configuration file, checks the current time every minute, and plays the corresponding sound through play.sh based on the configuration.
This project is licensed under the GNU General Public License v3.0.
Happy scheduling! Let the bells keep you on track ⏲️.