GothenburgBitFactory / taskwarrior

Taskwarrior - Command line Task Management
https://taskwarrior.org
MIT License
4.34k stars 292 forks source link

Color themes not working #3461

Open ManuGraiph opened 4 months ago

ManuGraiph commented 4 months ago

Hi,

For some reason, i can't change any color output either in my taskwarrior or taskwarrior-tui gui when sourcing any theme file in the taskrc. I'm not sure if i'm missing an option, other than the include file for the theme.

I'm on arch, my terminal is wezterm and my term is xterm-256color.

Any idea what could it be?

djmitche commented 4 months ago

Are you just seeing plain text? @adriangalilea has been working with themes and might be able to help debug.

ManuGraiph commented 4 months ago

Yep, the colors are always the same, regardless of what "theme" i select. If i copy the color lines in the taskrc, it's the same.

adriangalilea commented 4 months ago

https://gist.github.com/adriangalilea/c0756755d364e87ccca186b1e0361d3d

This is the theme I came up with, that I save on ~/.task/themes and then on ~/.taskrc I add: include ~/.task/themes/violet.theme

Not sure what problem are you experiencing, but you can try task color command to debug if the program/terminal is capable of producing the colors and determine if it's a config issue or lower level.

celadevra commented 4 months ago

Yep, the colors are always the same, regardless of what "theme" i select. If i copy the color lines in the taskrc, it's the same.

In my case, I put my taskrc under ~/.config/task, but forgot to delete ~/.taskrc. The latter has higher precedence when TW looks for its config.

djmitche commented 4 months ago

You can verify that with task diag, which will show the config file location.

djmitche commented 4 months ago

Hm, this is the second report of task color configuration not "taking", so perhaps there's something funny going on here. If the correct config file is, indeed, in use, then perhaps this has to do with ordering of config within the file?

Shadabdullah commented 2 months ago

Hi,

For some reason, i can't change any color output either in my taskwarrior or taskwarrior-tui gui when sourcing any theme file in the taskrc. I'm not sure if i'm missing an option, other than the include file for the theme.

I'm on arch, my terminal is wezterm and my term is xterm-256color.

Any idea what could it be?

I am facing same issues ,

djmitche commented 2 months ago

Does task show | grep ^color show the expected colors?

ziofil commented 2 weeks ago

I have the same issue. Here's the output of the command you just suggested:

Screenshot 2024-09-13 at 5 25 28 PM
djmitche commented 2 weeks ago

Are those different from the colors in your theme? If so, where does task diag say it is reading the configuration from?

ziofil commented 2 weeks ago

No, they are always the same color regardless of the color theme in the settings. It also looks like taskrc is found and accessed correctly.

Screenshot 2024-09-17 at 8 36 49 AM
djmitche commented 2 weeks ago

Thanks! So it seems like there's something related to the include in /Users/fliippo/.taskrc. Try changing that to a path that doesn't exist, and see if you get an error message?

ziofil commented 1 week ago

Not sure I understand: should I change the path of the data/hooks inside taskrc? Or should I temporarily move .taskrc elsewhere? This is my current taskrc (I have moved it to the XDG directory as suggested, but nothing has changed, btw):

# [Created by task 3.1.0 9/13/2024 08:07:20]
# data.location=/Users/filippo/.task
news.version=3.1.0

# To use the default location of the XDG directories,
# move this configuration file from ~/.taskrc to ~/.config/task/taskrc and update location config as follows:

data.location=~/.local/share/task
hooks.location=~/.config/task/hooks

# Color theme (uncomment one to use)
#include light-16.theme
#include light-256.theme
#include dark-16.theme
#include dark-256.theme
include dark-red-256.theme
#include dark-green-256.theme
#include dark-blue-256.theme
#include dark-violets-256.theme
#include dark-yellow-green.theme
#include dark-gray-256.theme
#include dark-gray-blue-256.theme
#include solarized-dark-256.theme
#include solarized-light-256.theme
#include no-color.theme

If I move taskrc I get this error message:

task show
A configuration file could not be found in /Users/filippo

Would you like a sample /Users/filippo/.taskrc created, so Taskwarrior can proceed? (yes/no) n
Cannot proceed without rc file.
djmitche commented 1 week ago

No, I meant to change

include dark-red-256.theme

to something like

include no-such-file.theme

and see if you get an error message.