Commit Graph

16 Commits

Author SHA1 Message Date
Matthew Forrester
e1db59fb8d rc repl x11: do not send new line
The X11 repl is unique in that it sends the selection (or parameter) with a
new line appended.

This patch removes that new line and thus, brings it into line with the tmux
and kitty versions.
2021-02-05 06:04:16 +00:00
Matthew Forrester
c9d50660f1 rc repl x11: allow arg for repl send & refocus kak
tmux-send-text allows sending an argument, when supplied the argument
will be sent to the REPL instead of the current selection.

tmux-send-text also keeps kak focussed, which does not happen in the x11
variant as it uses xdotool to switch window.

this patch allows:

 * Passing an argument to x11-send-text, so that value will be sent
 instead of the current selection.
 * We capture the window id of the current (presumably kak window)
 before we use xdotool to switch window. We can therefore switch back to
 kak afterwards (which we do)
2021-01-16 15:57:32 +00:00
Tilman List
d545d2c181 if the $WINDOWID is not set, use xdotool to get the window id 2020-10-30 14:35:20 +01:00
Tilman List
a5dbeeb5ee simplify x11-repl by using x11-terminal 2020-10-30 12:19:53 +01:00
Tilman List
de6e86da46 changed the way the x11 REPL interaction works
Now it uses the window id to identify the REPL window. It is stored in
the option x11_repl_id. That way it is possible to have different REPLs
for different buffers or windows.
2020-10-27 14:26:27 +01:00
Frank LENORMAND
87f9be6723 rc repl: Normalise REPL commands
It's unclear what the `send-text` alias does at first glance,
so prefixing it with "repl-" both fixes that and helps make it
discoverable via the command prompt's fuzzy matcher.

The `repl` alias also seems too generic a name, the "-new" suffix
should hopefully give a hint that it creates a new window.
2020-09-01 13:34:52 +03:00
Johannes Altmanninger
7d52bae5cb rc/x11: failure message when some external tools are missing
Addresses #3591
2020-07-28 20:32:56 +02:00
Philman
63c4336a3c
finetuned the :send-text command
See discussions on [github](https://github.com/philgee1981/kakoune/pull/1) and on [the kakoune message board](https://discuss.kakoune.com/t/trying-to-run-kakoune-repl-with-st-and-dwm/1122/3)
2020-07-03 06:46:41 +02:00
Frank LENORMAND
275abb227e rc: Make docstrings more readable
This cosmetics commit makes use of the auto-deindentation syntax,
available to docstrings.
2020-02-03 20:53:28 +01:00
Frank LENORMAND
5b1f9255a1 rc: Use the standard fail command to report errors
Merely using `echo` with markup doesn't log errors in the debug
buffers, and is also less readable.
2019-11-14 08:32:55 +01:00
codesoap
ca2741fe20 Rename ModuleLoad hook to ModuleLoaded
This clarifies, that the hook is run *after* the module is loaded.
2019-06-25 19:16:47 +02:00
codesoap
df03a8850c Comment on the escape sequence for setting the terminal's title 2019-06-18 11:52:33 +02:00
codesoap
9d8fb8bc31 Print escape sequence to set the window title
Using xdotool was probably a little less portable, because it relied on
the newly created window to be activated by the window manager.
2019-06-18 11:41:59 +02:00
codesoap
feebad14b0 Set the REPL window title using xdotool
As mentioned in issue #2973, the -t argument for setting the terminal
title was not very portable.
2019-06-18 09:58:32 +02:00
Justin Frank
aa6d19bee6 Added modules to extra files 2019-04-08 17:05:55 -07:00
Alex Leferry 2
7d400dce7f Add windowing/repl category 2019-03-21 12:09:39 +01:00