Skip to content

Commit

Permalink
docs: basic for dooit_api
Browse files Browse the repository at this point in the history
  • Loading branch information
kraanzu committed Nov 5, 2024
1 parent ad10f11 commit c3f9ca3
Showing 1 changed file with 124 additions and 0 deletions.
124 changes: 124 additions & 0 deletions site/docs/configuration/dooit_api.md
Original file line number Diff line number Diff line change
@@ -1 +1,125 @@
<style>
h2 code {
color: var(--vp-c-brand-1);
}
</style>

<!-- ------------------------------------ -->

# Dooit API

DooitAPI is an api object that you'll use in your config to configure everything in dooit's ui \
All the next sections will walk you through all the functions provided by the api

There are two things that you need to know of:

- The api has certain functions to perform some particular tasks
- The api also exposes other sub modules which you can find in other section for configurations

### Sub-modules
------------

- [`css`]()
- [`keys`]()
- [`layouts`]()
- [`formatter`]()
- [`bar`]()
- [`vars`]()
- [`dashboard`]()

### Functions

```py
@subscribe(Startup)
def setup(api: DooitAPI, _):
api.<Your function here>
```


## `method` add_child_node

Add a child to the highlighted item

## `method` add_sibling

Add a sibling to the highlighted item

## `method` decrease_urgency

Decrease the urgency of the todo

## `method` edit

Start editing a property of the focused item

## `method` edit_description

Start editing the description of the focused item

## `method` edit_due

Start editing the due date of the todo

## `method` edit_effort

Start editing the effort of the todo

## `method` edit_recurrence

Start editing the recurrence of the todo

## `method` go_to_bottom

Move the cursor to the bottom of the list

## `method` go_to_top

Move the cursor to the top of the list

## `method` increase_urgency

Increase the urgency of the todo

## `method` move_down

Move the cursor down in the focused list

## `method` move_up

Move the cursor up in the focused list

## `method` remove_node

Remove the highlighted item

## `method` shift_down

Shift the highlighted item down

## `method` shift_up

Shift the highlighted item up

## `method` start_search

Start a search within the list

## `method` start_sort

Start sorting the siblings of the highlighted item

## `method` switch_focus

Switch focus between the workspace and the todo list

## `method` toggle_complete

Toggle the completion of the todo

## `method` toggle_expand

Toggle the expansion of the highlighted item

## `method` toggle_expand_parent

Toggle the expansion of the parent of the highlighted item

0 comments on commit c3f9ca3

Please sign in to comment.