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

Lua config doesn't seem to execute commands with exec_once as autoload #121

Closed
vnepogodin opened this issue Dec 24, 2023 · 2 comments · Fixed by #122
Closed

Lua config doesn't seem to execute commands with exec_once as autoload #121

vnepogodin opened this issue Dec 24, 2023 · 2 comments · Fixed by #122
Assignees
Labels
bug Something isn't working

Comments

@vnepogodin
Copy link
Contributor

vnepogodin commented Dec 24, 2023

Lua config doesn't seem to execute commands with exec_once as autoload, while exec works fine

e.g

process.spawn_once("alacritty", function(stdout, stderr, exit_code, exit_msg)
   print("finished spawn_once")
end)

alacritty doesn't show up after launch.

@Ottatop
Copy link
Collaborator

Ottatop commented Dec 25, 2023

If you have alacritty open anywhere else on your system then Pinnacle counts it as running and won't spawn it using spawn_once.

The solution would be to check if the program was spawned by Pinnacle itself before choosing not to run it.

Edit: This is because the Lua API delegates to pgrep to check for duplicate processes.

@Ottatop Ottatop added the bug Something isn't working label Dec 25, 2023
@Ottatop Ottatop self-assigned this Dec 25, 2023
@Ottatop
Copy link
Collaborator

Ottatop commented Dec 26, 2023

Should be fixed now, feel free to reopen if it still doesn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants