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

Add options to KittyOpenRunner #9

Open
venzen opened this issue Sep 12, 2022 · 1 comment
Open

Add options to KittyOpenRunner #9

venzen opened this issue Sep 12, 2022 · 1 comment

Comments

@venzen
Copy link

venzen commented Sep 12, 2022

It would be useful to be able to add options to the KittyOpenRunner command. For example, specifying a kitty layout or running a shell command via the kitty option cmdline:

I guess a logical place to specify such options would be in the lua config file. Perhaps by adding a config option "open_opts" that then gets concatenated during the open_and_or_send() function.

@jghauser if you think this is a reasonable approach then I can code it and send a pull request with updates to the README too.

Any suggestions would be welcome. Understand that my goal here is to always open kitty with the same (alternate) layout and with an instance of vim-tiny running before I start sending lines. I've tried to automate this process with a keymap (in Normal mode and using KittyRunCommand) but once Nvim enters Command mode I cannot specify the command text from the keymap. Workarounds welcome.

@jghauser
Copy link
Owner

Hey @venzen! Sorry for the slow response!

I think this sounds like a great idea! What do you mean with the cmdline option? A quick search in the man files doesn't seem to yield any results. I'm not sure the open_or_send() function is the right place as the kitty instance is opened in M.open_runner(). Would having a custom extension of the the args table in M.open_runner() achieve what you need? I'm thinking that we could have something like extra_opts in the config which is merged into the args table. What do you think?

I'm not sure if we need to consider something regarding the order of the options but that should be easy to figure out.

Feel free to hack away and send a PR, I'll be more than happy to take a look!

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