Skip to content

Configuration

Simon Schürrle edited this page Jan 15, 2024 · 14 revisions

The config location should be present in you local config dir Run this command to print the directory:

python -c "import appdirs; print(appdirs.user_config_dir('dooit'))"

⚠️ For rendering colored/styled texts have a look at Markup Syntax and Text Class

⚠️ The default colors are used as nord colors and not ansi colors due to this reason

COLORS

These are just color global variables you can set! For example:

black = "#2e3440"
white = "#e5e9f0"
grey = "#d8dee9"
red = "#bf616a"
frost_green = "#8fbcbb"
cyan = "#88c0d0"
green = "#a3be8c"
yellow = "#ebcb8b"
blue = "#81a1c1"
magenta = "#b48ead"
orange = "#d08770"

Colors red, yellow and green are used in the app
The others can be used in other config options as desired :D

GENERAL

These are some basic global settings for the app

BACKGROUND = black # background color of the app
BAR_BACKGROUND = black # background color of bar
WORKSPACES_BACKGROUND = black # background color for workspaces pane
TODOS_BACKGROUND = black # background color for todos pane
BORDER_DIM = grey + " 50%" # color for non-focused pane
BORDER_LIT = blue # color for focused pane

# A comma-separated color tuple for foreground and background colors for title of un-focused pane
# It can be a single string as well, it will then use the `BORDER_DIM` as bg color
BORDER_TITLE_DIM = grey, dark_black 

# Same as above for focused pane
BORDER_TITLE_LIT = white, blue

SEARCH_COLOR = red # highlight color when searching
YANK_COLOR = blue # a color flash for yanking a todo/workspace/description
SAVE_ON_ESCAPE = False # whether to cancel the todo or save it when esc is pressed. `False` means cancel
USE_DATE_FIRST = True # whether to use dd-mm or mm-dd. True means day first

# This defines how the date is referenced in the Due Column
# See here: https://strftime.org/
DATE_FORMAT = "%d %h"
TIME_FORMAT = "%H:%M" # use this format for time if time is non zero

DASHBOARD

The dashboard variable is a list of TextTypes (str or rich's Text) that can be rendered as a dashboard!
You can also include a list inside the list to maintain the exact alignment for different lines

For example:

ART = some_ascii_art
QUOTE = "Gotta do stuff !!!"
STATS = [
     f"Completed: {completed}",
     f"Pending: {pending}",
     f"Overdue: {overdue}",
]
PAD = " "
DASHBOARD = [ART, QUOTE, PAD, STATS]

Everything is rendered with center alignment independent of other items
but putting them in an array will try to make them all align the same For example:

With alignment:

image

Without alignment:

image


WORKSPACE

EMPTY_WORKSPACE = [
    "🍻",
    "No workspaces yet?",
    f"Press [{cyan}]'a'[/{cyan}] to add some!",
] # Message to show when there are no workspaces, it's a list of renderable and works just like DASHBOARD 

WORKSPACE =  {
    "editing": cyan, # style/color for a focused item when editing
    "pointer": "> ", # A pointer to show the cursor position

     # Text to show if there are children's workspaces
     # You can use some vars for a hint
     # VARS
     # count: number of children inside the workspace 
     # You can use this in 2 different ways
     # Example 1: This will indicate that the workspaces have additional child workspaces
     "children_hint": "+",
     # Example 2: This will indicate the presence of children along with a count
     "children_hint": "+{count}",

     "start_expanded": False, # Develop Branch: On startup expand all workspaces with child workspaces
}

TODOS

COLUMN_ORDER = ["description", "due", "urgency"]  # order of columns for todo pane
TODO = {
    "color_todos": False, # this will color the todos based on their status (overdue: red, pending: yellow, done: green)
    "editing": cyan, # style/color for focused todo when not editing
    "pointer": "> ", # cursor pointer
    "due_icon": "🕑", # icon to use for due
    "effort_icon": "🗲 ", # icon to use for effort
    "effort_color": yellow, # color to use for effort
    "recurrence_icon": " ⟲ ", # icon to use for recurrence
    "recurrence_color": blue, # color to use for recurrence
    "tags_color": red, # color for tags
    "completed_icon": "✓ ", # icon for completed todo
    "pending_icon": "● ", # icon for pending todo
    "overdue_icon": "! ", # icon for overdue todo

    "urgency1_icon": "🅐", # icon for urgency 1 (lowest)
    "urgency2_icon": "🅑", 
    "urgency3_icon": "🅒",
    "urgency4_icon": "🅓",

    # Develop Branch: Change the color of each urgency
    "urgency1_color": "green",
    "urgency2_color": "yellow",
    "urgency3_color": "orange",
    "urgency4_color": "red",

    "initial_urgency": 1,  # Develop Branch: Create new todos with this urgency
    
    # See workspace children hint for details
    # VARS
    # remaining: Todos remaining
    # done     : Todos done 
    # total    : Total todos
    "children_hint": "({done}/{total})"
    "children_hint": "{remaining}",  

    "start_expanded": False,  # Develop Branch: On startup expand all todos with child todos
}

EMPTY_TODO = [
    "🤘",
    "Wow so Empty!?",
    "Add some todos to get started!",
] # Message to show when there are no todos. The list works just like dashboard's list

BAR

More about this in BAR

KEYBINDINGS

More about this in KEYBINDINGS

Clone this wiki locally