feat: add bounded agenda view
Add a read-only 42-day occurrence agenda with keyboard navigation, six-week paging, exact return-to-grid focus, search and calendar overlays, and bounded recurrence expansion. Keep agenda state outside persistence, document month-only mutations, and cover empty windows, filtering, overlays, navigation, rendering, and terminal restoration.
This commit is contained in:
@@ -57,6 +57,8 @@ void print_help(std::ostream& output)
|
||||
" Tab/Shift-Tab focus appointments, Enter reads, Esc returns,\n"
|
||||
" a adds, e edits, d deletes; Ctrl-S saves inside the editor,\n"
|
||||
" u undoes the last change, Ctrl-R redoes it,\n"
|
||||
" g opens the 42-day agenda; arrows/jk/Tab choose, Enter jumps,\n"
|
||||
" PageUp/PageDown or p/n shift its window, Esc/g returns,\n"
|
||||
" c toggles calendar visibility, / searches appointments,\n"
|
||||
" t jumps to today, ? toggles help, q quits.\n";
|
||||
}
|
||||
@@ -159,6 +161,12 @@ int print_frame(std::span<const nocal::Event> events, bool no_color)
|
||||
.search_result_index = 0,
|
||||
.notification = {},
|
||||
.notification_is_error = false,
|
||||
.show_calendar_picker = false,
|
||||
.calendar_index = 0,
|
||||
.show_agenda = false,
|
||||
.agenda_start_day = day,
|
||||
.agenda_items = {},
|
||||
.agenda_index = 0,
|
||||
};
|
||||
std::cout << nocal::tui::render_month(events, state) << '\n';
|
||||
return std::cout ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
|
||||
Reference in New Issue
Block a user