This does not quite reproduce what you want, but it's close.
Try setting org-agenda-use-time-grid
to t
. That will show you a time grid like this:
Weather: 6:34...... Sunrise
8:00...... ----------------
10:00...... ----------------
12:00...... ----------------
14:00...... ----------------
16:00...... ----------------
18:00...... ----------------
Weather: 18:37...... Sunset
20:00...... ----------------
Then check out the variable org-agenda-time-grid
. Its doc string says:
org-agenda-time-grid is a variable defined in ‘org-agenda.el’.
Its value is
((daily today require-timed)
(800 1000 1200 1400 1600 1800 2000)
"......" "----------------")
You can customize this variable.
Documentation:
The settings for time grid for agenda display.
This is a list of four items. The first item is again a list. It contains
symbols specifying conditions when the grid should be displayed:
daily if the agenda shows a single day
weekly if the agenda shows an entire week
today show grid on current date, independent of daily/weekly display
require-timed show grid only if at least one item has a time specification
remove-match skip grid times already present in an entry
The second item is a list of integers, indicating the times that
should have a grid line.
The third item is a string which will be placed right after the
times that have a grid line.
The fourth item is a string placed after the grid times. This
will align with agenda items.
So changing the fourth item (or not: you might leave it as a bunch of dashes) should do what you want:
(setq org-agenda-use-time-grid t)
(setq org-agenda-time-grid '((daily today require-timed)
(800 1000 1200 1400 1600 1800 2000)
"......" "----Free----"))
What this does not do is coalesce a range of free times into one. I think that would require substantial changes in the code.