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

Autostart not working with alacritty #1273

Closed
jorian opened this issue Mar 26, 2022 · 6 comments
Closed

Autostart not working with alacritty #1273

jorian opened this issue Mar 26, 2022 · 6 comments

Comments

@jorian
Copy link

jorian commented Mar 26, 2022

Very happy with Zellij, but one thing isn't working as expected. When I start Alacritty, I want it to open Zellij automatically.

I use ZSH and oh-my-zsh, and have the Zellij plugin installed and enabled in .zshrc. It's there where I also define ZSH_ZELLIJ_AUTOSTART to be set to true. However, Zellij isn't automatically started in Alacritty.

It does however work on VS Code. Zellij is automatically started in VS Code, which is a bit annoying.

When I check the ENV ZSH_ZELLIJ_AUTOSTART in Alacritty, it is set to true, so that isn't the issue.

I use this plugin.

Anybody have an idea what I'm missing?

@jaeheonji
Copy link
Member

jaeheonji commented Mar 28, 2022

Hi! Actually, I'm not the Alacritty user, so I don't know the exact reason. However, I have confirmed that the plugin works well with wezterm, windows terminal, and iterm2 in the latest zellij version.

So I think this is a problem related to setting up Alacrity.

@ken-matsui
Copy link
Contributor

Hi @jorian,

How about setting the shell option on your alacritty.yml?

Here is my configuration:
https://github.com/ken-matsui/dotfiles/blob/5426a08732a79711ccd77e573e6c781ed3a3e207/.config/alacritty/alacritty.yml#L133-L138

This lets Zellij attach the first created session if exists or create a new session if no session exists.

@jorian
Copy link
Author

jorian commented Mar 29, 2022

Thanks, that seems to work, although I had to remove the arguments to zellij to make it work. Alacritty crashes when I leave the arguments in.

Now I still need to figure out how to prevent VS Code from opening zellij and just run a separate zsh session

@jaeheonji
Copy link
Member

Try to check the $TERM_PROGRAM variable. If it's a vscode terminal, $TERM_PROGRAM will be "vscode".

@imsnif
Copy link
Member

imsnif commented Apr 13, 2022

Hey, can we close this issue?

@jorian
Copy link
Author

jorian commented Apr 13, 2022

Yes, everything is fine now!

@jorian jorian closed this as completed Apr 13, 2022
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

No branches or pull requests

4 participants