taskwarrior icon indicating copy to clipboard operation
taskwarrior copied to clipboard

Color themes not working

Open ManuGraiph opened this issue 1 year ago • 21 comments

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?

ManuGraiph avatar May 17 '24 15:05 ManuGraiph

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

djmitche avatar May 17 '24 16:05 djmitche

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.

ManuGraiph avatar May 17 '24 16:05 ManuGraiph

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.

adriangalilea avatar May 19 '24 17:05 adriangalilea

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.

celadevra avatar May 27 '24 04:05 celadevra

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

djmitche avatar May 27 '24 19:05 djmitche

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?

djmitche avatar May 27 '24 20:05 djmitche

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 ,

Shadabdullah avatar Jul 19 '24 03:07 Shadabdullah

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

djmitche avatar Jul 19 '24 14:07 djmitche

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

Screenshot 2024-09-13 at 5 25 28 PM

ziofil avatar Sep 13 '24 14:09 ziofil

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

djmitche avatar Sep 13 '24 15:09 djmitche

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

ziofil avatar Sep 17 '24 15:09 ziofil

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?

djmitche avatar Sep 18 '24 01:09 djmitche

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.

ziofil avatar Sep 25 '24 20:09 ziofil

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.

djmitche avatar Sep 25 '24 22:09 djmitche

Sorry for replying so late. Yes I do get an error:

[taskwarrior-tui error]: Unable to run `task show`.

Could not find file in CWD, directory of config file or search paths 'no-such-file.theme'.

Please check your configuration or open a issue on github.

If you need additional help, please report as a github issue on https://github.com/kdheepak/taskwarrior-tui

ziofil avatar Oct 30 '24 18:10 ziofil

I guess that error is from tui, and I don't really know how that tool works. But I suppose task would say the same?

I'm pretty stumped, then. I don't know how Taskwarrior could be reading most of the settings in a config file but not all of them. I guess I'd suggest making one last check of .taskrc to see if there are any includes that aren't commented out or anything else that might be overriding the color scheme.

djmitche avatar Oct 31 '24 00:10 djmitche

I suspect this is a taskwarrior-tui bug. Can you file it there, referencing this one?

djmitche avatar Nov 16 '24 21:11 djmitche