Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
kraanzu committed Nov 25, 2024
2 parents ba62110 + 881e8f8 commit 7970550
Show file tree
Hide file tree
Showing 7 changed files with 264 additions and 254 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
# Dooit ✔️
*A todo manager that you didn't ask for, but needed !*

[![Wiki](https://img.shields.io/badge/Wiki-Dooit-blue?style=flat-square)](https://dooit-org.github.io/dooit/)
[![Wiki](https://img.shields.io/badge/Wiki-Dooit-white?style=flat-square)](https://dooit-org.github.io/dooit/)
![PyPI Downloads](https://static.pepy.tech/badge/dooit)
[![GitHub issues](https://img.shields.io/github/issues/dooit-org/dooit?color=red&style=flat-square)](https://github.com/dooit-org/doit/issues)
[![GitHub stars](https://img.shields.io/github/stars/dooit-org/dooit?color=green&style=flat-square)](https://github.com/dooit-org/doit/stargazers)
[![GitHub license](https://img.shields.io/github/license/dooit-org/dooit?color=white&style=flat-square)](https://github.com/dooit-org/doit/blob/main/LICENSE)
[![Support Server](https://img.shields.io/discord/989186205025464390.svg?label=Discord&logo=Discord&colorB=7289da&style=flat-square)](https://discord.gg/WA2ER9MBWa)

-----------------------------
Expand Down
2 changes: 1 addition & 1 deletion dooit/api/todo.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from typing import List
from sqlalchemy import ForeignKey, select, nulls_last
from sqlalchemy.orm import Mapped, mapped_column, relationship, validates
from .model import DooitModel, generate_unique_id
from .model import DooitModel
from .manager import manager


Expand Down
2 changes: 1 addition & 1 deletion dooit/api/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from sqlalchemy import ForeignKey, asc, select
from sqlalchemy.orm import Mapped, mapped_column, relationship
from ..api.todo import Todo
from .model import DooitModel, generate_unique_id
from .model import DooitModel
from .manager import manager

ModelType = Union["Workspace", "Todo"]
Expand Down
5 changes: 5 additions & 0 deletions dooit/ui/api/dooit_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ def focused(self) -> ModelTree:

raise ValueError(f"Expected BaseTree, got {type(focused)}")

def copy_description_to_clipboard(self):
"""Copy the description of the focused item to the clipboard"""

self.focused.copy_description_to_clipboard()

def switch_focus(self):
"""Switch focus between the workspace and the todo list"""

Expand Down
4 changes: 4 additions & 0 deletions dooit/ui/widgets/trees/model_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,10 @@ def refresh_options(self) -> None:
def _get_parent(self, id: str) -> Optional[ModelType]:
raise NotImplementedError # pragma: no cover

@require_highlighted_node
def copy_description_to_clipboard(self):
self.app.copy_to_clipboard(self.current_model.description)

@refresh_tree
def _expand_node(self, _id: str) -> None:
self.expanded_nodes[_id] = True
Expand Down
1 change: 1 addition & 0 deletions dooit/utils/default_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ def key_setup(api: DooitAPI, _):
api.keys.set("J", api.shift_down)
api.keys.set("K", api.shift_up)
api.keys.set("xx", api.remove_node)
api.keys.set("y", api.copy_description_to_clipboard)
api.keys.set("c", api.toggle_complete)
api.keys.set(["=", "+"], api.increase_urgency)
api.keys.set(["-", "_"], api.decrease_urgency)
Expand Down
500 changes: 250 additions & 250 deletions poetry.lock

Large diffs are not rendered by default.

0 comments on commit 7970550

Please sign in to comment.