A Complete Program

A Complete Program

So for that we’ll use the command, which is provided by the Dunst program and which allows us to create notifications with titles, body messages, and variable levels of urgency. In general, a program has three parts:

The main job of this program is reasonably complete: after a delay of the given number of seconds, it will create a notification containing the given title and message (or sensible defaults if none are given). So we’ll need to change our default values and loop construct from:

And, since it’s conceivable that the custom command might want information from the timer, we’ll pipe the notification’s title and message into that command’s :

So right now our program is pretty ugly:

To the user it’s looking nice enough because its interface is predictable, friendly, and mnemonic.

Source: richardmavis.info