Skip to main content

Settings

Struct Settings 

Source
pub struct Settings {
Show 34 fields pub roots: Vec<String>, pub agenda_files: Vec<String>, pub todo_keywords: Vec<Vec<String>>, pub ids: IdPolicy, pub tag_alist: Vec<String>, pub persistent_tags: Vec<String>, 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: String, pub agenda_start_day: Option<String>, pub week_start: String, 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: String, pub log_repeat: String, pub log_reschedule: String, pub log_redeadline: String, pub log_into_drawer: bool, pub editor: Vec<String>, pub theme: String, pub agent_capture_to: String, pub agent_inbox_template: String, pub someday_tag: String, pub someday_clears_scheduled: 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<Vec<String>>

org-todo-keywords: one list per sequence, with exactly one “|”.

§ids: IdPolicy

“preserve” leaves headings alone; “add-on-write” adds an org-id :ID: on a heading’s first edit.

§tag_alist: Vec<String>§persistent_tags: Vec<String>§tags_column: i64

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: String

day, week, month or a number of days.

§agenda_start_day: Option<String>§week_start: String

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: String

org-log-done, org-log-repeat, org-log-reschedule, org-log-redeadline: nil, time or note. #+STARTUP options win per file.

§log_repeat: String§log_reschedule: String§log_redeadline: String§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: String

auto (follow the terminal background), dark or light.

§agent_capture_to: String

“template” captures through the agent’s chosen template; “inbox” sends every agent capture through agent_inbox_template without dates.

§agent_inbox_template: String§someday_tag: String§someday_clears_scheduled: bool

Someday also removes SCHEDULED, so the task leaves the agenda.

§reschedule_nudge: usize

Triage suggests Someday after this many reschedules.

§captures: Vec<CaptureTemplate>§views: Vec<ViewSettings>§agent_profiles: Vec<AgentProfile>

Implementations§

Source§

impl Settings

Source

pub fn capture_template(&self, key: &str) -> Option<&CaptureTemplate>

Source

pub fn view(&self, key: &str) -> Option<&ViewSettings>

Source

pub fn agent_profile(&self, name: &str) -> Option<&AgentProfile>

Source

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.

Trait Implementations§

Source§

impl Clone for Settings

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Settings

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Settings

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Settings

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Settings

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Settings

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Settings

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more