pub struct Settings {Show 35 fields
pub roots: Vec<String>,
pub agenda_files: Vec<String>,
pub todo_keywords: Vec<String>,
pub todo_keyword_colors: BTreeMap<String, String>,
pub ids: IdPolicy,
pub tags_column: i64,
pub tag_inheritance_exclusions: Vec<String>,
pub highest_priority: String,
pub lowest_priority: String,
pub default_priority: String,
pub agenda_span: AgendaSpan,
pub agenda_start_day: Option<String>,
pub week_start: WeekStart,
pub deadline_warning_days: i64,
pub skip_scheduled_if_done: bool,
pub skip_deadline_if_done: bool,
pub skip_timestamp_if_done: bool,
pub sorting_strategy: Vec<String>,
pub log_done: LogMode,
pub log_repeat: LogMode,
pub log_reschedule: LogMode,
pub log_redeadline: LogMode,
pub log_into_drawer: bool,
pub editor: Vec<String>,
pub theme: String,
pub nerd_font: bool,
pub notation: Notation,
pub start_view: String,
pub agent_inbox: Option<String>,
pub someday_tag: String,
pub someday_clears_dates: bool,
pub reschedule_nudge: usize,
pub captures: Vec<CaptureTemplate>,
pub views: Vec<ViewSettings>,
pub agent_profiles: Vec<AgentProfile>,
}Expand description
Everything agd reads from config.toml, one flat table: every setting is
a top-level key, and only capture templates, views and agent profiles are
lists of records ([[capture]], [[view]], [[agent_profile]]).
Missing keys take the defaults below; unknown keys are errors.
Fields§
§roots: Vec<String>The only directories agd reads or writes.
agenda_files: Vec<String>org-agenda-files: files, directories (their *.org files) or globs.
Empty means every .org file under the roots.
todo_keywords: Vec<String>org-todo-keywords, one #+TODO: line per sequence, such as
“TODO NEXT WAIT(w@/!) | DONE CANCELLED”: read by the same code as a
file’s own #+TODO: lines, which replace these. A line without |
makes its last keyword the done state, as in Org.
todo_keyword_colors: BTreeMap<String, String>org-todo-keyword-faces for the TUI: a color name (COLOR_NAMES) per keyword. A view section takes the color its rows’ keywords share. The default colors the default workflow’s WAIT yellow and CANCELLED dim-red; a map of your own replaces it.
ids: IdPolicy“preserve” leaves headings alone; “add-on-write” adds an org-id :ID: on a heading’s first edit.
org-tags-column: negative right-aligns tags to end at that column, positive starts them there, as Emacs does when it rewrites a headline.
tag_inheritance_exclusions: Vec<String>§highest_priority: String§lowest_priority: String§default_priority: String§agenda_span: AgendaSpanorg-agenda-span: “day”, “week”, “month” or a number of days
(agenda_span = 10).
agenda_start_day: Option<String>§week_start: WeekStartorg-agenda-start-on-weekday: “monday” or “sunday”.
deadline_warning_days: i64§skip_scheduled_if_done: bool§skip_deadline_if_done: bool§skip_timestamp_if_done: bool§sorting_strategy: Vec<String>org-agenda-sorting-strategy for agenda days, from SORTING_KEYS.
log_done: LogModeorg-log-done, org-log-repeat, org-log-reschedule, org-log-redeadline:
“off” (Emacs’s nil), “time” or “note”. #+STARTUP options win per
file.
log_repeat: LogMode§log_reschedule: LogMode§log_redeadline: LogMode§log_into_drawer: bool§editor: Vec<String>Program and arguments to open a file; {file}, {line} and {col}
are substituted. Run directly, never through a shell.
theme: Stringauto (follow the terminal background), dark or light.
nerd_font: boolRound pill and chip caps with Nerd Font glyphs; turn on when your terminal font has them (Ghostty, WezTerm and kitty bundle them).
notation: NotationHow a capture line takes tags and a priority, and how agd shows
tags: “agd” (#work, !A) or “org” (:work:, #A).
start_view: StringThe view key agd opens on, such as your dashboard or the built-in
n; empty opens Today.
agent_inbox: Option<String>A [[capture]] key: every agent capture goes through that template
without dates, so agent work reaches your day only through triage.
Absent, agents choose a template.
someday_tag: String§someday_clears_dates: boolSomeday also removes the dates that put the task on the agenda (SCHEDULED, and an overdue DEADLINE), so it leaves the agenda.
reschedule_nudge: usizeTriage suggests Someday after this many reschedules.
captures: Vec<CaptureTemplate>§views: Vec<ViewSettings>The user’s own views only; all_views and view add the built-in
ones.
agent_profiles: Vec<AgentProfile>Implementations§
Source§impl Settings
impl Settings
Sourcepub fn agenda_start(&self, today: NaiveDate) -> Result<NaiveDate, AgdError>
pub fn agenda_start(&self, today: NaiveDate) -> Result<NaiveDate, AgdError>
The first agenda day: agenda_start_day from today, or today.
pub fn capture_template(&self, key: &str) -> Option<&CaptureTemplate>
Sourcepub fn default_capture_template(&self) -> Result<&CaptureTemplate, AgdError>
pub fn default_capture_template(&self) -> Result<&CaptureTemplate, AgdError>
The template a capture goes through when none is named: the first
[[capture]]. (An agent’s capture then goes to agent_inbox when
it is set, as every agent capture does.)
Sourcepub fn capture_line_template<'a>(
&self,
line: &'a str,
) -> Result<(&CaptureTemplate, &'a str), AgdError>
pub fn capture_line_template<'a>( &self, line: &'a str, ) -> Result<(&CaptureTemplate, &'a str), AgdError>
How a capture line names its template, the one rule for every
surface: the first word is the template key when it names a
[[capture]] and more text follows; otherwise the whole line is the
text for the default template. Returns the template and the text.
Sourcepub fn find_capture_template(
&self,
key: &str,
) -> Result<&CaptureTemplate, AgdError>
pub fn find_capture_template( &self, key: &str, ) -> Result<&CaptureTemplate, AgdError>
The template key names, or an unknown_template error that lists
the templates there are.
Sourcepub fn find_view(&self, key: &str) -> Result<&ViewSettings, AgdError>
pub fn find_view(&self, key: &str) -> Result<&ViewSettings, AgdError>
The view key runs, or an unknown_view error that lists every
view, the built-in ones too.
Sourcepub fn find_start_view(&self) -> Result<&ViewSettings, AgdError>
pub fn find_start_view(&self) -> Result<&ViewSettings, AgdError>
The view agd agenda --view without a key runs: start_view.
Sourcepub fn view(&self, key: &str) -> Option<&ViewSettings>
pub fn view(&self, key: &str) -> Option<&ViewSettings>
The view key runs: the user’s [[view]], else a built-in one.
Sourcepub fn all_views(&self) -> Vec<&ViewSettings>
pub fn all_views(&self) -> Vec<&ViewSettings>
Every view a key can run: the user’s [[view]]s in config order,
then the built-in views they do not replace.
Sourcepub fn is_builtin_view(&self, key: &str) -> bool
pub fn is_builtin_view(&self, key: &str) -> bool
Whether key runs a built-in view rather than one of the user’s.
Sourcepub fn apply_agent_profile(
&mut self,
name: &str,
match_expression: Option<String>,
) -> Result<Option<String>, AgdError>
pub fn apply_agent_profile( &mut self, name: &str, match_expression: Option<String>, ) -> Result<Option<String>, AgdError>
Narrows these settings to [[agent_profile]] name, as agd agenda --profile and MCP agenda do: its files replace
agenda_files, and its match is the match unless match_expression
gives one, which this returns.
Sourcepub fn find_agent_profile(&self, name: &str) -> Result<&AgentProfile, AgdError>
pub fn find_agent_profile(&self, name: &str) -> Result<&AgentProfile, AgdError>
The [[agent_profile]] name names, or an unknown_profile error
that lists the profiles there are.
Sourcepub fn editor_command(
&self,
file: &str,
line: usize,
col: usize,
) -> (String, Vec<String>)
pub fn editor_command( &self, file: &str, line: usize, col: usize, ) -> (String, Vec<String>)
The editor program and its arguments with {file}, {line} and
{col} (both 1-based) substituted inside each argument. The result
goes straight to the process API, never to a shell, so file names
with spaces or quotes stay one argument.