sched 20 “pizza is ready”
While coding I often want to set a timer to be reminded when
- the pizza in the oven ready
- I tried too long to get my bell-and-whistle-but-not-really-necessary-feature implemented (while programming I often don't stop following one certain track until something stops me)
- it's time to leave to catch the bus
On linux, the easiest way is to have this in your ~/.bashrc-File:
-
sched () {
-
(sleep $(($1*60)); xmessage "$2") &
-
}
For having the popup message "pizza is ready" in 20 minutes, type sched 20 "pizza is ready".
For the bash-beginners (as me): $((math expr)) evaluates the math expression, i.e. 60*5 becomes 300. The parentheses around sleep and xmessage start a new sub process. So this still works if you quit the shell you started sched in.
