Skip to content

Commit

Permalink
Merge branch 'dev' into sync
Browse files Browse the repository at this point in the history
  • Loading branch information
agateau committed Oct 31, 2024
2 parents 5982266 + 06d74b4 commit 3a33ed6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions yokadi/core/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,13 @@ def getKeywordsAsString(self):

def getUserKeywordsNameAsString(self):
"""
Returns all keywords keys as a string like "key1, key2, key3...".
Returns all keywords keys as a string like "@key1 @key2 @key3...".
Internal keywords (starting with _) are ignored.
"""
keywords = [k for k in list(self.getKeywordDict().keys()) if not k.startswith("_")]
keywords.sort()
if keywords:
return ", ".join(keywords)
return " ".join(f"@{k}" for k in keywords)
else:
return ""

Expand Down
5 changes: 2 additions & 3 deletions yokadi/ycli/textlistrenderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,10 @@ def __call__(self, task):
# Create title
title = task.title
if keywords and len(title) < maxWidth:
title += ' ('
colorizer.setColorAt(len(title), C.BOLD)
title += ' '
colorizer.setColorAt(len(title), C.ORANGE)
title += keywords
colorizer.setResetAt(len(title))
title += ')'

# Crop title to fit in self.width
titleWidth = len(title)
Expand Down

0 comments on commit 3a33ed6

Please sign in to comment.