From ec7283fc90fe1b72d520477988165f4e272b6269 Mon Sep 17 00:00:00 2001 From: nojhan Date: Fri, 1 Sep 2023 12:11:23 +0200 Subject: [PATCH] fix touched color management --- .task/backlog.data | 2 ++ .task/pending.data | 4 ++-- .task/undo.data | 8 ++++++++ presets/colors_nojhan.conf | 2 +- taskwarrior-deluxe.py | 5 ++++- 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.task/backlog.data b/.task/backlog.data index b3e549b..078de6c 100644 --- a/.task/backlog.data +++ b/.task/backlog.data @@ -108,3 +108,5 @@ {"description":"semantic colors: allow coloring by values, not just fields.","end":"20230901T063707Z","entry":"20230817T065528Z","modified":"20230901T063707Z","status":"completed","uuid":"1a5aab4a-0c2b-444f-9259-6eddc29b9791","tags":["feat","themes"]} {"description":"test","entry":"20230901T095852Z","modified":"20230901T095852Z","status":"pending","uuid":"4ecaeb6a-372e-425f-8a12-9a2ec3d70755"} {"description":"test","end":"20230901T095856Z","entry":"20230901T095852Z","modified":"20230901T095856Z","status":"completed","uuid":"4ecaeb6a-372e-425f-8a12-9a2ec3d70755"} +{"description":"systematic icons: add a systematic way to insert icons after\/before any field","entry":"20230829T153938Z","modified":"20230901T100942Z","priority":"H","status":"pending","uuid":"be1a6eb3-3406-44d1-957a-e952c0d69f2a","tags":["feat","themes"]} +{"description":"visual deps: find an efficient way to show dependencies","entry":"20230831T193007Z","modified":"20230901T101000Z","priority":"M","status":"pending","uuid":"b3bd2bc3-3857-42b9-8168-5e21bcddbec5","tags":["design","feat"]} diff --git a/.task/pending.data b/.task/pending.data index a1a6869..916b453 100644 --- a/.task/pending.data +++ b/.task/pending.data @@ -3,6 +3,6 @@ [dep_1a5aab4a-0c2b-444f-9259-6eddc29b9791:"x" depends:"1a5aab4a-0c2b-444f-9259-6eddc29b9791" description:"more themes" entry:"1691864624" modified:"1693548680" priority:"L" status:"pending" tags:"themes" tags_themes:"x" uuid:"9ee183d4-3413-4efa-ba68-10d709669c05"] [description:"colored panels: allow selecting a different swatch for each &open;sub&close;panel" entry:"1692122434" modified:"1692122452" priority:"M" status:"pending" tags:"feat,themes" tags_feat:"x" tags_themes:"x" uuid:"ca17838d-958f-498b-bff5-a24576820ae7"] [description:"hashed color: add a hash&open;color1,rgb123,...&close; color tag allowing to randomly pick a stable color for items like tags" entry:"1693323512" modified:"1693323524" priority:"M" status:"pending" tags:"feat" tags_feat:"x" uuid:"22082221-a02a-4f85-901e-135a99c396c3"] -[description:"systematic icons: add a systematic way to insert icons after\/before any field" entry:"1693323578" modified:"1693323578" status:"pending" tags:"feat,themes" tags_feat:"x" tags_themes:"x" uuid:"be1a6eb3-3406-44d1-957a-e952c0d69f2a"] +[description:"systematic icons: add a systematic way to insert icons after\/before any field" entry:"1693323578" modified:"1693562982" priority:"H" status:"pending" tags:"feat,themes" tags_feat:"x" tags_themes:"x" uuid:"be1a6eb3-3406-44d1-957a-e952c0d69f2a"] [description:"up\/down dirs: display summary of databases further up or down the current one." entry:"1693423835" modified:"1693423835" priority:"H" status:"pending" tags:"feat" tags_feat:"x" uuid:"03998ee8-9917-49cf-a6cb-3fdd14a7deb3"] -[description:"visual deps: find an efficient way to show dependencies" entry:"1693510207" modified:"1693510207" status:"pending" tags:"design,feat" tags_design:"x" tags_feat:"x" uuid:"b3bd2bc3-3857-42b9-8168-5e21bcddbec5"] +[description:"visual deps: find an efficient way to show dependencies" entry:"1693510207" modified:"1693563000" priority:"M" status:"pending" tags:"design,feat" tags_design:"x" tags_feat:"x" uuid:"b3bd2bc3-3857-42b9-8168-5e21bcddbec5"] diff --git a/.task/undo.data b/.task/undo.data index 8431c76..8708a25 100644 --- a/.task/undo.data +++ b/.task/undo.data @@ -399,3 +399,11 @@ time 1693562336 old [description:"test" entry:"1693562332" modified:"1693562332" status:"pending" uuid:"4ecaeb6a-372e-425f-8a12-9a2ec3d70755"] new [description:"test" end:"1693562336" entry:"1693562332" modified:"1693562336" status:"completed" uuid:"4ecaeb6a-372e-425f-8a12-9a2ec3d70755"] --- +time 1693562982 +old [description:"systematic icons: add a systematic way to insert icons after\/before any field" entry:"1693323578" modified:"1693323578" status:"pending" tags:"feat,themes" tags_feat:"x" tags_themes:"x" uuid:"be1a6eb3-3406-44d1-957a-e952c0d69f2a"] +new [description:"systematic icons: add a systematic way to insert icons after\/before any field" entry:"1693323578" modified:"1693562982" priority:"H" status:"pending" tags:"feat,themes" tags_feat:"x" tags_themes:"x" uuid:"be1a6eb3-3406-44d1-957a-e952c0d69f2a"] +--- +time 1693563000 +old [description:"visual deps: find an efficient way to show dependencies" entry:"1693510207" modified:"1693510207" status:"pending" tags:"design,feat" tags_design:"x" tags_feat:"x" uuid:"b3bd2bc3-3857-42b9-8168-5e21bcddbec5"] +new [description:"visual deps: find an efficient way to show dependencies" entry:"1693510207" modified:"1693563000" priority:"M" status:"pending" tags:"design,feat" tags_design:"x" tags_feat:"x" uuid:"b3bd2bc3-3857-42b9-8168-5e21bcddbec5"] +--- diff --git a/presets/colors_nojhan.conf b/presets/colors_nojhan.conf index ce5d4cc..ef80c7e 100644 --- a/presets/colors_nojhan.conf +++ b/presets/colors_nojhan.conf @@ -1,5 +1,5 @@ -color.touched=#4E9A06 +color.touched=rgb4e9a06 color.id=rgbffaf00 color.title= color.description=color231 diff --git a/taskwarrior-deluxe.py b/taskwarrior-deluxe.py index 5f03e13..d456646 100755 --- a/taskwarrior-deluxe.py +++ b/taskwarrior-deluxe.py @@ -309,7 +309,7 @@ class stack: for task in self.sorter(tasks): taskers = self.tasker(task) if str(task["id"]) in self.tasker.touched: - row = [self.rtext("▶", "r.touched")] + row = [self.rtext("▶", "touched")] else: row = [""] @@ -586,6 +586,9 @@ def get_layouts(kind = None, name = None): def tw_to_rich(color): + # Rich does not like capitals. + color = color.lower() + # color123 -> color(123) color = re.sub(r"color([0-9]{0,3})", r"color(\1)", color)