Skip to content

Commit

Permalink
config(default): add urgency col
Browse files Browse the repository at this point in the history
  • Loading branch information
kraanzu committed Oct 2, 2024
1 parent 202b027 commit c7ce530
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions dooit/utils/default_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ def todo_due_formatter(due, _):

return text

def todo_urgency_formatter(urgency, _):
if urgency == 0:
return ""

return f"!{urgency}"

# Workspace formatters

def workspace_desc_formatter(desc: str, workspace: Workspace):
Expand Down Expand Up @@ -84,12 +90,14 @@ def key_setup(api: DooitAPI):
TodoWidget.status,
TodoWidget.description,
TodoWidget.due,
TodoWidget.urgency
]

api.formatter.workspaces.description.add(workspace_desc_formatter)

api.formatter.todos.status.add(todo_status_formatter)
api.formatter.todos.description.add(todo_desc_formatter)
api.formatter.todos.due.add(todo_due_formatter)
api.formatter.todos.urgency.add(todo_urgency_formatter)

api.bar.set(bar_widgets)

0 comments on commit c7ce530

Please sign in to comment.