fabriceb/GCalCron2 — Issue #10: support for 'macros'
Author: ndbroadbent
Created: 2012-01-09 08:03:25+00:00
State: open

Here's an idea for a feature that I think would be really useful.
I currently have a task that shuts down my desktop computer at 10:30pm on workdays, otherwise I tend to stay up all night working on projects like this...
So in the description of the event, I have the following lines:

```
-10: DISPLAY=:0 notify-send "Shutting down computer in 10 minutes"
-5: DISPLAY=:0 notify-send "Shutting down computer in 5 minutes"
-3: DISPLAY=:0 notify-send "Shutting down computer in 3 minutes" "Please save your work"
-1: DISPLAY=:0 notify-send Shutting down computer in 1 minute" "Please save your work"
poweroff
```

I would like to replace this with something like:

```
macro: shutdown
```

This would cause the script to search a `macros` folder in the application directory, or maybe the users HOME directory, for a file called `shutdown`. It would then simply replace that line in the description with the contents of the macro file, and parse the final result.
This means that macros could be combined with commands, or even other macros, to create complex tasks.