GothenburgBitFactory / timewarrior

Timewarrior - Commandline Time Tracking and Reporting
https://timewarrior.net
MIT License
1.26k stars 95 forks source link

Tag coloring priority changed from 1.1.1 to current version #272

Open wuxua opened 4 years ago

wuxua commented 4 years ago

I use a dedicated color for different tags. In the last version, when an interval has multiple tags the interval would use the color of the first sorted tag. I used numbers as a prefix to make the tag that I wanted to be sorted first, so the interval would take that color. However, in the current version it seems that the interval takes the color of the last sorted tags. With this change my coloring system doesn't work anymore. Is there any way that I could change that? Thanks.


       Platform: Cygwin

Compiler:
        Version: 6.4.0
           Caps: +stdc +stdc_hosted +200809 +200809 +LP64 +c8 +i32 +l64 +vp64 +time_t64
     Compliance: C++11

Build Features
          Built: Dec 30 2019 14:32:02
          CMake: 3.6.2
     Build type: release

Configuration
  TIMEWARRIORDB: -
            Cfg: /home/myname/.timewarrior/timewarrior.cfg (-rw- 1370 bytes)
       Database: /home/myname/.timewarrior (drwx 0 bytes)
    Color theme: Built-in default

Extensions
       Location: /home/myname/.timewarrior/extensions (drwx 0 bytes)
               (None)
thetimbecker commented 4 years ago

I like your solution of sorting by number prefix, but a better way to color intervals with multiple tags in general would be great.

thetimbecker commented 4 years ago

I found a workaround that works for me. For my use case, I have a handful of "primary" tags (e.g. bau, meeting, break) for broad categories of time that I want to correspond to a color, but I also want to add "secondary" tags in order to group tags (e.g. work, nonwork) or be more specific about how that time was spent (e.g. lunch, walk).

Based on what @wuxua originally posted, I now prefix all my "secondary" tags with an underscore so they are lower priority for coloring. Now I can have color coded reports and still have my grouping and granular tags.

It can look a little ugly, but functionally it works great.