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

feat(home-manager): add support for wezterm #433

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

taranarmo
Copy link

This adds support for WezTerm theme. There are no specific option fo themes in the wezterm home-manager module so I used extraConfig.

Copy link
Member

@isabelroses isabelroses left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My suggestions do depend on a catppuccin wezterm package.

modules/home-manager/wezterm.nix Outdated Show resolved Hide resolved
modules/home-manager/wezterm.nix Outdated Show resolved Hide resolved
modules/home-manager/wezterm.nix Show resolved Hide resolved
@taranarmo taranarmo force-pushed the add-wezterm-home-manager branch from 989e1fa to b72c8b5 Compare December 30, 2024 12:54
Copy link
Member

@isabelroses isabelroses left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using config.catppuccin.sources.wezterm will require a package, take a look at https://github.com/catppuccin/nix/blob/main/CONTRIBUTING.md.

@taranarmo taranarmo force-pushed the add-wezterm-home-manager branch from b72c8b5 to e8d22ad Compare December 30, 2024 14:03
@taranarmo taranarmo force-pushed the add-wezterm-home-manager branch 6 times, most recently from c441571 to 9512a18 Compare December 30, 2024 16:09
@taranarmo
Copy link
Author

Eventually with help of search engines and chatbots I was able to make it working. I replaced require with dofile which solved the issue.

Copy link
Member

@isabelroses isabelroses left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall, LGTM.

@isabelroses isabelroses requested a review from getchoo December 30, 2024 19:44
@taranarmo taranarmo force-pushed the add-wezterm-home-manager branch from 68ae54c to cf0402a Compare December 31, 2024 10:24
@taranarmo taranarmo force-pushed the add-wezterm-home-manager branch from cf0402a to 6be9577 Compare December 31, 2024 10:34
@taranarmo
Copy link
Author

Rebased and resolved conflicts

@taranarmo taranarmo force-pushed the add-wezterm-home-manager branch from 6be9577 to 6d1b11a Compare December 31, 2024 21:21
Copy link
Member

@isabelroses isabelroses left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps something more like this

modules/home-manager/wezterm.nix Outdated Show resolved Hide resolved
modules/home-manager/wezterm.nix Outdated Show resolved Hide resolved
modules/home-manager/wezterm.nix Outdated Show resolved Hide resolved
modules/home-manager/wezterm.nix Outdated Show resolved Hide resolved
@taranarmo
Copy link
Author

I updated the code though now it doesn't follow the global catppuccin.enable = true. Should we enable the apply by default?

@isabelroses
Copy link
Member

I updated the code though now it doesn't follow the global catppuccin.enable = true. Should we enable the apply by default?

I think not. Because this will often be a breaking change and its a bit of a strange to use. we do something similar to this for kvantum.

@taranarmo
Copy link
Author

I updated the code though now it doesn't follow the global catppuccin.enable = true. Should we enable the apply by default?

I think not. Because this will often be a breaking change and its a bit of a strange to use. we do something similar to this for kvantum.

Okay then, we can update the code once the wezterm module for home manager will be updated to support more than extraConfig. Thanks for your comments and suggestions!

Copy link
Member

@getchoo getchoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Diff LGTM

config = wezterm.config_builder()
end

dofile("${sources.wezterm}/plugin/init.lua").apply_to_config(config)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might want to export this as a variable so it's actually able to be imported in someone's own config, though

Maybe something like

extraConfig = ''
  local catppuccin_plugin = "${sources.wezterm}/plugin/init.lua"
''
+ lib.mkIf cfg.apply (lib.mkBefore ''
  <...?
'');

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated, please take a look. Lua isn't my strong side as well as Nix 😅

@getchoo getchoo added this to the 2.0.0 milestone Jan 5, 2025
@taranarmo taranarmo force-pushed the add-wezterm-home-manager branch from 079da07 to 1091805 Compare January 5, 2025 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants