-
Notifications
You must be signed in to change notification settings - Fork 140
how to specify theme? #110
Comments
I am sorry, currently the theming feature is more than a workaround. Since tview doesn't keep the actual background color, this feature was necessary at least in a minimal form to me. The plan for later is to actually make certain elements colorable, not just general stuff like "Primary Text". Anyway, currently the only way to generate a theme, is filling the struct in Just change the values and do |
For reference, this is what happens when you actually keep don't manually set background colors: rivo/tview#314 |
hey, no problem!
Will this generate a configuration that will work with an unmodified version of |
oh btw i meant theme.json and yes, should work either way, just drop it in your configuration folder. |
Hmmm, I got themes to work by editing theme.go, but a theme.json is not being sent to stdout (i.e. |
oh sorry, sometimes my brain is off ... imeant to execute the theme utility not cordless main |
I ended up writing a custom |
Okay, I am sorry wasn't able to explain stuff. Just for clarity, here again: In order to change the theme you need to edit the values in: https://github.com/Bios-Marcel/cordless/blob/master/tools/theme/theme.go Go the sourcedirectory of cordless and run that file via I am not sure what exactly you did. Mind to show me? I am glad that it worked anyway ^^ |
I am not sure what exactly you did. Mind to show me? I am glad that it
worked anyway ^^
Oh, ha. I was editing `config/theme.go`, not `tools/theme/theme.go` :P
I simply edited the default theme (using `tcell.GetColor` iirc), then used `json.Marshal`. It was hacky, but it worked.
|
lol, good job. |
The theming hasn't been designed from the bottom up, so there's no principle to theme everything. We could technically come up with something though. Maybe something like css with component types and component ids or so 🤷♂️ |
Is your source up to date
What happened
Looking at theme.go, I assumed that creating a
themes.json
next to the existingconfig.json
(based on the default values) would change the theme of cordless.What did you expect to happen
I expected the theme to change
How do you reproduce this bug
Error output
How to fix
System information
The text was updated successfully, but these errors were encountered: