Since I was so lazy that I started brewing tea right in a mug, I started using the teatime applet. Already after the third day, the setting “Dumplings” started there. Of course, not the best solution, given the characteristics of the cooking process of this wonderful dish.
Since I too was too lazy to write an applet, I decided to jot down a tiny reminder script.
So, setting the problem
The essence of the task is extremely simple - two timers, one notifies about boiling water, the second - about the readiness of the dish. Notification is best accompanied by light effects for improved response.
Implementation
Sketch
The simplest option can be described as:
- wait for the nth amount of time
- notify boiling water
- wait for the nth amount of time
- notify of readiness
The notification itself consists of:
- Standard notice
- Signal speaker
- Flashing drive door
Training
Notification is done via
notify-send
. Text message command:
notify-send
To be sure, set the
-t 10000
flag so that the message is held for 10 seconds.
The signal is given by the speaker with the
beep
command. Estets can edit the frequency and duration, but the default settings suit me.
The door opens and closes with the commands
eject -r
and
eject -t
')
If there are no libraries, you can install them:
sudo apt-get install libnotify-bin beep
Code
Without further ado, let's take the simplest one given above. The only thing is we will put in a separate procedure all dances with notifications. We give her the text and the number of beeps / door openings.
In the header of the configuration script:
- time to boil
- cooking time (from boiling to readiness)
- whether to beep
- open drive
All intervals measured on its plate, adjust if necessary.