Skip to content

feat(config): Add environment variables in layout pane commands #4144

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

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

Conversation

glcraft
Copy link

@glcraft glcraft commented Apr 18, 2025

Add the ability to set environment variables into pane commands from the layout configuration.

A env_vars property is added into pane node to define environment variables

Example:

layout {
    pane {
      command "zsh"
      args "-c" "echo ==> $TEST_FOR_ZELLIJ <=="
      env_vars {
        TEST_FOR_ZELLIJ "hello world"
      }
    }
}

Note : With this implementation, env_vars has to be a node with subnode (so not in kdl arguments form).

Note 2: This is my first PR, I hope I didn't miss anything aside from the implementation.

@glcraft
Copy link
Author

glcraft commented Apr 18, 2025

Resolves #2988

@glcraft glcraft changed the title feat(config): Add environment variables in layout commands feat(config): Add environment variables in layout pane commands Apr 18, 2025
@glcraft
Copy link
Author

glcraft commented Apr 20, 2025

It misses the restoration after quitting a session and resurrect it. I have to fix that before merging

@glcraft
Copy link
Author

glcraft commented Apr 22, 2025

It should be good now 👍

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.

1 participant