Launch editor in a kitty tab from qutebrowser? #8573
Replies: 4 comments
-
You need ot setup remote control on a socket first.
Then use
kitten @ --to unix:yoursocket launch ...
|
Beta Was this translation helpful? Give feedback.
-
Well as far as my question went, your answer was indeed correct. However, the contents are not being inserted back into the text field, once I leave the editor. I was using this command in qutebrowser:
after having launched kitty with: With just this command (which launches a new instance of kitty):
the contents are being inserted back into the text input field as they should. Can I tweak the first command so I can get the best of both worlds? |
Beta Was this translation helpful? Give feedback.
-
You need to have your command wait until the editor exits. How you do
that is up to you. For instance, use a script that runs the remote
control command and then waits until the window with the returned id is
closed, which it can do by polling using kitten @ ls --match. Or if you
want to be more sophisticated instead of running the editor, run a
script which runs the editor and then uses some form of IPC to signal
the first script when the editor quits. It can do so easily using kill
to send the signal. The options are endless.
|
Beta Was this translation helpful? Give feedback.
-
Oh and I forgot, you can use kitten @ run instead of kitten @ launch this will allow you extreme flexibility in how to run your editor and get the text from it. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Does anybody here use qutebrowser? I would like to launch my editor on text input fields, such as the one I am writing in now, and make the editor show up in a kitty tab in an existing kitty session. qutebrowser has a command that will launch an editor with a key stroke on a text input field so you may edit the contents in our editor, save them and then have the contents inserted into the browsers text input field once you leave the editor. E.g. the command in the qutebrowser config file:
c.editor.command = ["xterm", "jed", "exec {line}g{column0}l", "{}", "-f", "text_mode"]
would launch my editor, jed, in an xterm.
I am trying the following with kitty:
c.editor.command = ["kitty", "@", "launch", "--type=tab", "--no-response", "jed", "{}", "-f", "text_mode"]
but qutebrowser responds with:
Does anybody know how I should construct the command?
Beta Was this translation helpful? Give feedback.
All reactions