Commit Graph

47 Commits

Author SHA1 Message Date
eli
453cb7f367 Fix issue with tmux.kak setting empty TMPDIR variable 2021-04-24 17:59:13 +01:00
Johannes Altmanninger
3ab2b98ec3 rc: remove spurious tabs
This makes it easier to be consistent.

Also replace "<<-EOF" by "<<EOF", since the former only does trims
tabs, not spaces.
2021-04-17 20:56:23 +02:00
Maxime Coste
c507863a00 Merge remote-tracking branch 'Eluminae/wayland' 2021-03-23 21:50:27 +11:00
Reed Wade
feab20260a
Permit usage on wayland environments.
Some wayland wm will not setup a DISPLAY environment variable. Kakoune
should allow x11 windowing toolkit for those wm also.
2021-03-21 13:41:40 +01:00
basbebe
1183e716bc
make kitty repl command consistent with other kitty commands 2021-03-11 10:40:14 +01:00
basbebe
8d5d0d7d90
use kitty launch command, make commands consistent
`new-window` is a legacy command (see https://github.com/kovidgoyal/kitty/issues/2708).
`KITTY_WINDOW_ID` should be set for any kitty window anyways.
2021-03-11 10:36:30 +01:00
Maxime Coste
bdee3abd88 Match on kitty window id when available
This ensures new window are created in the same os window as the
current client instead of the default one.

Closes #4009
2021-03-01 08:47:09 +11:00
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
Hideaki Kawai
52222a52e4 Support KITTY_LISTEN_ON on kitty-terminal-tab and kitty-focus 2021-01-22 09:19:35 +09:00
Hideaki Kawai
38b914162a
Update rc/windowing/kitty.kak
Co-authored-by: Screwtapello <thristian@gmail.com>
2021-01-22 08:41:41 +09:00
Hideaki Kawai
0917191118 Respect KITTY_LISTEN_ON when launching terminal 2021-01-21 18:58:48 +09: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
Maxime Coste
183bb660b7 Merge branch 'patch-5' of http://github.com/co-dh/kakoune 2021-01-04 09:44:58 +11:00
Hao Deng
d6c96dc456
Update tmux.kak
When $1 or ${kak_selection} start with dash, like "-1", the command will fail, because tmux think it's an argument flag.
-- prevent this.
Also the doc (append new line) is no longer valid.
2020-12-30 16:11:02 -05:00
harryoooooooooo
96df051ea3 tmux-focus: Add support for focusing a client on another window. 2020-12-28 23:04:00 +08:00
Maxime Coste
6cf3c13d97 Merge remote-tracking branch 'listentolist/tmux-repl' into master 2020-11-08 14:53:38 +11: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
9955cfdd8d changed scope of tmux_repl_id from global to current
By setting the tmux_repl_id in the `current` scope it is possible to have
different REPLs for different buffers or windows.
2020-10-27 17:20:33 +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
Maxime Coste
4793a4e8ce Allow multiple arguments in tmux repl
Fixes #3680
2020-08-30 10:53:03 +10:00
Maxime Coste
616f6bbe9b Merge remote-tracking branch 'krobelus/fail-on-missing-tools' 2020-08-02 16:50:33 +10:00
Johannes Altmanninger
7d52bae5cb rc/x11: failure message when some external tools are missing
Addresses #3591
2020-07-28 20:32:56 +02:00
Johannes Altmanninger
0fb99f217a tmux.kak: use TMUX_PANE for tmux-terminal-{horizontal,vertical}
In case a user connects to the same Kakoune session from multiple tmux
windows/sessions, this makes the splits appear next to the calling client,
instead the client where the Kakoune session was started.
2020-07-28 20:32:56 +02:00
SolitudeSF
91914a8501
Fix syntax errors. 2020-07-06 14:55:54 +03:00
Simon Fowler
b875a1802c Implement smarter detection of windowing environments.
This patch centralises the loading of windowing environments, in order
to ensure that by default only a single module is loaded, rather than
the current code which can load multiple potentially incompatible
modules; and in order to provide the user with more control over the
loading of windowing modules.

The patch introduces a new str-list option `windowing_modules` which
defines an ordered list of windowing modules to attempt to load. Modules
are loaded in the order specified in the list until a module loads
without error, at which point the process finishes.

When loaded each windowing module tests the environment to determine
whether it should load (e.g. the tmux module tests to see if it's being
run within a tmux session), and if it determines that it should then it
completes its loading without error. If it doesn't detect an appropriate
environment then it returns an error, and the module loading logic tries
the next module.

The user can override the default `windowing_modules` list to specify
their preferred modules (i.e. they can put kitty ahead of tmux if that's
their preference, or they can leave out the x11 modules alltogether). In
addition, if the `windowing_modules` option is an empty list this
bypasses the environment detection logic completely, and allows the
modules to be loaded manually - this allows a user to replace the
windowing module loading logic with their own manual set up.
2020-07-05 22:48:31 +10: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
Jason Felice
d287251326 Split modules and allow kitty-send-text to take a parameter 2020-04-27 11:58:39 -04: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
Alex Leferry 2
fed8f01e47 x11-terminal: Leverage the shell quoting of lists for perfect forwarding
Fixes x11-terminal forwarding
2020-01-13 05:26:08 +01:00
Frank LENORMAND
7b9ae595c0 rc repl tmux: Do not check for the Tmux version
This commit removes attempts to auto-detect the version of the local
Tmux binary.

The Tmux package that ships with OpenBSD doesn't have a version
number[1], and therefore doesn't provide any way to check if it's
compatible with the REPL module, making the feature disabled by
default in that distribution.

Fixes #3237.

[1] https://github.com/tmux/tmux/issues/1141#issuecomment-340244302
2019-12-10 12:15:08 +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
Jason Felice
6f443537e4 Accept tmux pre-release and rc versions 2019-10-22 10:25:41 -04: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
codesoap
7ade105319 Add st (simple terminal) to the known terminals 2019-06-07 21:46:20 +02:00
codesoap
7c8c5ad506 Remove ' from comment in subshell
On OpenBSD's sh this causes a "no closing quote" error.
2019-06-05 15:16:07 +02:00
Justin Frank
887a5223ac Fixed if statement in x11 detection 2019-04-08 17:08:35 -07:00
Justin Frank
49b00992ca Fix x11 overriding tmux 2019-04-08 17:05:55 -07:00
Justin Frank
aa6d19bee6 Added modules to extra files 2019-04-08 17:05:55 -07:00
Justin Frank
c3f694a28f Modified base files to use modules 2019-04-08 17:02:44 -07:00
Alex Leferry 2
c7218940cb Make kitty honoring the current working directory
Fixes #2819
2019-03-28 14:29:54 +01:00
Alex Leferry 2
7d400dce7f Add windowing/repl category 2019-03-21 12:09:39 +01:00
Alex Leferry 2
c0dccdd90d Add categories in rc/
Closes #2783
2019-03-21 01:06:16 +01:00