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

Filepaths do not get interpreted correctly in config.kdl #1894

Open
simjnd opened this issue Nov 1, 2022 · 4 comments
Open

Filepaths do not get interpreted correctly in config.kdl #1894

simjnd opened this issue Nov 1, 2022 · 4 comments

Comments

@simjnd
Copy link

simjnd commented Nov 1, 2022

Or to put it another way: environment variables and the tilde are not expanded and will be interpreted literally

Steps to reproduce

  1. Place a valid .kdl theme file in ~/.config/zellij/themes (e.g. catppuccin-macchiato.kdl)
  2. Edit ~/.config/zellij/config.kdl
    • Set theme "catppuccin-macchiato"
    • Set theme_dir "~/.config/zellij/themes"
  3. Save and launch a new Zellij session, the theme will not be applied
  4. Edit ~/.config/zellij/config.kdl and remove theme_dir "~/.config/zellij/themes"
  5. Save and launch a new Zellij session, the theme will be applied

Similarly theme_dir ".config/zellij/themes" and theme_dir "$HOME/.config/zellij/themes" do not work.

But theme_dir "/Users/<name>/.config/zellij/themes" (on macOS) and theme_dir "themes" work

@uncomfyhalomacro
Copy link

I also had this problem. I just moved the theme configuration to config.kdl as a workaround

@hellerbarde
Copy link

hellerbarde commented Nov 18, 2022

For me, on Linux, it seems that only the fully qualified path works. At least none of the above-mentioned ones work ("themes" also doesn't work). Omitting it from the config.kdl does work, however. Thanks for that hint, @simjnd :)

@wiraki
Copy link

wiraki commented May 28, 2024

Bumping this as it has remained open and no word whether this is intended?

It was pretty confusing for me to debug, if variables cannot be used in paths defined in config.kdl then this should be documented somehow. But I still feel that it would be nice to handle variables in paths as it e.g. makes it much easier to share configs across machines.

Thanks!

@philsherry
Copy link

Just spent a while butting up against this error on macOS, trying to use "${XDG_CONFIG_HOME}/zellij" and "$ZELLIJ_CONFIG_DIR/themes". Ended up here.

It either tells me the file doesn’t exist (it does) or just refuses to autoload zellij in the session.

People use different machines and platforms, so portability is pretty important for configuration. Documenting that configuration is even more important—especially when it's using a language that barely anyone else uses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants