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

Api function to reload all tym instances #104

Open
Stardust-kyun opened this issue Apr 5, 2023 · 1 comment
Open

Api function to reload all tym instances #104

Stardust-kyun opened this issue Apr 5, 2023 · 1 comment

Comments

@Stardust-kyun
Copy link

As far as I can tell from the docs, tym does not have an api function that can reload all running instances of tym. This would allow for changes to the config or theme to be made without needing to go through and reload every instance manually.

@endaaman
Copy link
Owner

endaaman commented Aug 28, 2023

A combination of get_ids API and signals might help.

tym.set_keymap('<Ctrl>0', function()
  for id in pairs(tym.get_ids()) do
    tym.signal(id, 'hook', {'reload'})
  end
end)
tym.set_hook('signal', function(command)
  if command == 'reload' then
    tym.reload()
    return
  end
end)

Also added some docs to README about these IPC stuffs ( 5574e86 ), thanks.

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

2 participants