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

Layouts not loading from default location on MacOS #2266

Open
Amparose opened this issue Mar 10, 2023 · 8 comments
Open

Layouts not loading from default location on MacOS #2266

Amparose opened this issue Mar 10, 2023 · 8 comments

Comments

@Amparose
Copy link

Amparose commented Mar 10, 2023

Basic information

zellij --version: 0.35.1
stty size: 26 117
uname -av: Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 arm64

List of programs you interact with as, PROGRAM --version: output cropped meaningful, for example:
alacritty --version: alacritty 0.11.0 (8dbaa0b)

Further information
I have config loading from ~/.config/zellij/ and a theme loading from ~/.config/zellij/themes but when I create a layout in ~/.config/zellij/layouts I have to run zellij -l ~/.config/zellij/layouts/my-layout.kdl instead of just zellij -l my-layout.kdl as described in docs.

Error is IoError: No such file or directory (os error 2), File: my-layout.kdl

Not sure if I am doing something wrong or if this is a bug for MacOS.

@jaeheonji
Copy link
Member

jaeheonji commented Mar 11, 2023

Hi, @Amparose!

Could you try to load layout with only file name? like this zellij -l my-layout.
As far as I know, by appending an extension, it looks for files relative to the current directory.

@Amparose
Copy link
Author

Hi @jaeheonji

Thanks for the suggestion. I think I tried that but attempted again just now in case and still get the IoError.

@jaeheonji
Copy link
Member

@Amparose I see. then, could you share your zellij setup --check?

Example:

[Version]: "0.35.2"
[CONFIG DIR]: "/Users/meow/.config/zellij"
[CONFIG FILE]: "/Users/meow/.config/zellij/config.kdl"
[CONFIG FILE]: Well defined.
[DATA DIR]: "/Users/meow/Library/Application Support/org.Zellij-Contributors.Zellij"
[PLUGIN DIR]: "/Users/meow/Library/Application Support/org.Zellij-Contributors.Zellij/plugins"
 Builtin, default plugins will not be loaded from disk.
 Create a custom layout if you require this behavior.
[LAYOUT DIR]: "/Users/meow/.config/zellij/layouts"
[SYSTEM DATA DIR]: "/usr/share/zellij"
[ARROW SEPARATOR]: 
 Is the [ARROW_SEPARATOR] displayed correctly?
 If not you may want to either start zellij with a compatible mode: 'zellij options --simplified-ui true'
 Or check the font that is in use:
 https://zellij.dev/documentation/compatibility.html#the-status-bar-fonts-dont-render-correctly
[MOUSE INTERACTION]:
 Can be temporarily disabled through pressing the [SHIFT] key.
 If that doesn't fix any issues consider to disable the mouse handling of zellij: 'zellij options --disable-mouse-mode'
[DEFAULT EDITOR]: hx
[FEATURES]: []
[DOCUMENTATION]: zellij.dev/documentation

@Amparose
Copy link
Author

Sure:

❯ zellij setup --check
[Version]: "0.35.2"
[CONFIG DIR]: "/Users/me/.config/zellij"
[CONFIG FILE]: "/Users/me/.config/zellij/config.kdl"
[CONFIG FILE]: Well defined.
[DATA DIR]: "/Users/me/Library/Application Support/org.Zellij-Contributors.Zellij"
[PLUGIN DIR]: "/Users/me/Library/Application Support/org.Zellij-Contributors.Zellij/plugins"
 Builtin, default plugins will not be loaded from disk.
 Create a custom layout if you require this behavior.
[LAYOUT DIR]: "~/.config/zellij/layouts"
[SYSTEM DATA DIR]: "/usr/share/zellij"
[ARROW SEPARATOR]: 
 Is the [ARROW_SEPARATOR] displayed correctly?
 If not you may want to either start zellij with a compatible mode: 'zellij options --simplified-ui true'
 Or check the font that is in use:
 https://zellij.dev/documentation/compatibility.html#the-status-bar-fonts-dont-render-correctly
[MOUSE INTERACTION]:
 Can be temporarily disabled through pressing the [SHIFT] key.
 If that doesn't fix any issues consider to disable the mouse handling of zellij: 'zellij options --disable-mouse-mode'
[DEFAULT EDITOR]: hx
[FEATURES]: []
[DOCUMENTATION]: zellij.dev/documentation

@andradei
Copy link

andradei commented Apr 13, 2023

Have the same issue, having to pass the full path of the layout if I want to use it.

Using Wezterm and Ubuntu on WLS2

@andradei
Copy link

andradei commented Apr 13, 2023

@Amparose For me, this was related to #1894
Which meant I had to remove layouts_dir and themes_dir from ~/.config/zellij/config.kdl and let it use the default directories, which are

  • ~/.config/zellij/layouts
  • ~/.config/zellij/themes

Then zellij --layouts my_layout worked.

Note: it might also work to set absolute paths on layouts_dir and themes_dir, but I stopped when I got it working doing the above explanation.

@Amparose
Copy link
Author

@andradei looks like you got it: using the full non-tilde path works for me.

@sequoia42
Copy link

Having messed around with this for a bit, after having encountered the issue myself, paths in the config don't support path expansion. So, zellij looks for the literal ~ directory and finds nothing, correctly outputting an IoError.
It's probably worth mentioning that it needs to be an absolute path in the tutorials/docs.

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

4 participants