Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please update wezterm theme config instructions :-) #2

Closed
wez opened this issue Feb 23, 2022 · 5 comments
Closed

Please update wezterm theme config instructions :-) #2

wez opened this issue Feb 23, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@wez
Copy link

wez commented Feb 23, 2022

First, there's already a Dracula color scheme built into wezterm:
https://github.com/wez/wezterm/blob/main/assets/colors/Dracula.toml
that comes from https://github.com/mbadolato/iTerm2-Color-Schemes
Please consider adding your theme there and perhaps renaming it to disambiguate!
I periodically update and bundle the latest version of that repo with wezterm.

Secondly, it would be great to factor out the theme information from the current advice shown on https://draculatheme.com/wezterm so that it is easier for users to consume.

I would suggest creating a toml file that can be downloaded and placed in a color schemes directory:
https://wezfurlong.org/wezterm/config/appearance.html#defining-a-color-scheme-in-a-separate-file

An alternative would be to make a dracula.lua file that returns the colors section:

return {
   ansi = {...}
}

and then place that in $HOME/.config/wezterm/dracula.lua and adjust the main wezterm.lua:

local dracula = require 'dracula';
return {
   colors = dracula,
}
@zenorocha zenorocha transferred this issue from dracula/dracula-theme Feb 23, 2022
@zenorocha
Copy link

@timescam can you review and make the appropriate changes?

@rexkyng
Copy link
Member

rexkyng commented Feb 24, 2022

Updated, with the color scheme seperated out as dracula.lua, and included a sperate section in INSTALL.md to inform users how to use the bundled theme

As for iTerm2-Color-Schemes or creating a toml file, since this config also apply stylings to tab bar, to my understanding both options currently do not support that?

See if the changes fits, also thanks for the great terminal wez <3

@rexkyng rexkyng closed this as completed Feb 24, 2022
@wez
Copy link
Author

wez commented Aug 21, 2022

I'd love to see a toml file used for this; since .lua files are essentially arbitrary code, sharing a color scheme as a lua file introduces some risk to the user, especially if they get in the habit of blindly downloading and consuming those files.

You can specify the tab bar colors in TOML files. In addition, you can include metadata showing the origin and author of the color scheme, which wezterm's color scheme importer/automation can then use to show your color scheme in the docs. See https://wezfurlong.org/wezterm/colorschemes/d/index.html#dracula and scroll down for the next couple of dracula spin-offs schemes.

Current wezterm versions have some helper functions that will make it easy to produce the toml file: you can load your lua-based color scheme definition per your current instructions, but add something like this:

local metadata = {
   name = "Dracula",
   author = "Whomever",
  origin_url = "https://github.com/dracula/wezterm",
}
wezterm.color.save_scheme(dracula, metadata, "/tmp/dracula.toml")

Then wezterm will save out a toml version of the file when it is launched.

If you check that file into this repo, I can have it synced into nightly builds and it will be shipped as part of the next release.

See EdenEast/nightfox.nvim#183 for a similar thread for the nightfox color schemes.

@rexkyng rexkyng added the enhancement New feature or request label Aug 23, 2022
@rexkyng rexkyng reopened this Aug 23, 2022
rexkyng added a commit that referenced this issue Aug 23, 2022
@rexkyng
Copy link
Member

rexkyng commented Aug 23, 2022

toml file generated, and w/ the corresponding documents updated.
The helper function is very convenient, see if the changes fits

wez added a commit to wez/wezterm that referenced this issue Aug 23, 2022
@wez
Copy link
Author

wez commented Aug 23, 2022

Thanks! This is now sync'd to wezterm and visible in the docs: https://wezfurlong.org/wezterm/colorschemes/d/index.html#dracula-official
It will show up in the next nightly build and subsequent releases!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

3 participants