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

update wezterm toml files to include metadata #183

Closed
wez opened this issue Jul 19, 2022 · 6 comments
Closed

update wezterm toml files to include metadata #183

wez opened this issue Jul 19, 2022 · 6 comments
Labels
enhancement New feature or request

Comments

@wez
Copy link
Contributor

wez commented Jul 19, 2022

Please add a metadata section to your wezterm toml files; a block like this:

[metadata]
name = "Nightfox"
author = "EdenEast"
origin_url = "https://github.com/EdenEast/nightfox.nvim"

added to the bottom of each will allow wezterm to reference the scheme using the name Nightfox (if that is the case/capitalization you prefer).

In addition, I can then point wezterm's color scheme sync machinery at this repo to have it include your schemes in wezterm's next release, and keep it updated for future releases.

Having the metadata populated means that wezterm can show the author and upstream URL in its scheme browsing section of the docs; see https://wezfurlong.org/wezterm/colorschemes/b/index.html#belafonte-day for an example.

I think that would indirectly satisfy the wezterm users that filed #156

@digitallyserviced
Copy link
Contributor

I have opened PR #184 to provide the metadata fields to the template as well as generated new precompiled versions of the wezterm.toml files.

@EdenEast I love the themes and would love to see them available without extra work in Wezterm!!

@EdenEast
Copy link
Owner

Hi @wez happy to see the author of wezterm here! Going though the list of colorschemes from what I can see the majority are Capital, so I guess we can change it to that.

If you point wezterm to look at this repo could you also mention me. I would like to know how it is done and if for what ever reason (I may... make nightfox more than just a neovim theme) I can help maintain that.

@wez
Copy link
Contributor Author

wez commented Jul 19, 2022

Naming wise: if you prefer lowercase you can certainly use that; I was just proposing that as most existing schemes are capitalized, and your readme shows the names capitalized. The main thing for me is that having the word wezterm in the name would be redundant!

Filling out the author will show your name in the docs along with the origin_url, and let folks know that this is where it came from.

The sync part of this in wezterm will essentially be the same as this bit that syncs the catppuccin scheme:

https://github.com/wez/wezterm/blob/30e2a1a6d16bb092d773a0359a2e26c989066687/sync-color-schemes/src/main.rs#L292-L298

but with the URL set to this repo; that will download a tarball of your main branch and add each toml file to the list of schemes and store it in a json blob for the docs, and generate some rust source that will be compiled into a hash table from scheme name to scheme data.

The catppuccin folks are also setting some (currently semi undocumented) fields in the toml file that control the appearance of the retro tab bar and make it match their overall theme, if you were thinking of doing something like that.

@gegoune
Copy link
Contributor

gegoune commented Jul 19, 2022

The catppuccin folks are also setting some (currently semi undocumented) fields in the toml file that control the appearance of the retro tab bar and make it match their overall theme, if you were thinking of doing something like that.

That would be super nice to have.

@wez
Copy link
Contributor Author

wez commented Jul 19, 2022

https://github.com/catppuccin/wezterm/blob/main/dist/catppuccin-frappe.toml#L38-L81 shows what they're setting; those fields are documented in the context of https://wezfurlong.org/wezterm/config/appearance.html#retro-tab-bar-appearance
The same fields/structure is also accepted in the toml file.

If you wanted to play around with that, it might be most convenient to do something like this (recent nightly build required):

local wezterm = require 'wezterm'

local colors, metadata = wezterm.color.load_scheme("/path/to/file/from/this/repo.toml")

colors.tab_bar = {
   -- stuff
}

wezterm.color.save_scheme(colors, metadata, "/tmp/output.toml")

return {
  colors = colors,
}

that would help you figure out what to use in your toml template for the code gen used here in nightfox.

wez added a commit to wez/wezterm that referenced this issue Jul 20, 2022
note that "_bash (Gogh)" is removed by this as it is actually
a duplicate of nightfox but with a different name, according
to my dedup logic.

I may add a way to express aliases as a followup.

refs: EdenEast/nightfox.nvim#184
refs: EdenEast/nightfox.nvim#183
refs: EdenEast/nightfox.nvim#156
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants