Open VKondakoff opened 6 months ago
Are there any messages in the *debug*
buffer?
Nothing new, just the same error: Error: 1:1: 'new': 2:5: 'terminal': no such command
.
I'm pretty sure the problem is that terminal
command is not set correctly. I suppose it should contain something like alacritty -e sh -c
. But I have no idea where and how it should be set.
These two files seems related: https://raw.githubusercontent.com/mawww/kakoune/master/rc/windowing/x11.kak and https://raw.githubusercontent.com/mawww/kakoune/master/rc/windowing/new-client.kak
Any ideas?
Looks like x11.kak
doesn't define the alias terminal
for x11-terminal-window
? What would happen if you add the line
alias global terminal x11-terminal-window
If I'm just adding line alias global terminal x11-terminal-window
to kakrc
I'm receiving error:
Here is debug
buffer:
Should I source
or require
something first?
Edit: I have added X11.kak to autoload
and added the following to kakrc
:
hook global ModuleLoaded x11 %{
alias global terminal X11-terminal-window
}
Startup error is gone, but the :new
command still fires the same error...
you should not need to change anything. In fact, it's best to try with HOME=$(mktemp -d) kak
to rule out your config.
For some reason no windowing module is loaded. Run as kak -debug commands
and look at the contents of the *debug*
buffer.
It should contain a snippet like this one.
command require-module tmux
command evaluate-commands fail\ tmux\ not\ detected
command fail tmux not detected
command require-module screen
command evaluate-commands fail\ screen\ not\ detected
command fail screen not detected
command require-module zellij
command require-module kitty
command require-module iterm
command require-module appleterminal
command require-module sway
command evaluate-commands
command require-module wayland
command evaluate-commands
command declare-option -docstring shell\ command\ run\ to\ spawn\ a\ new\ terminal
a\ shell\ command\ is\ appended\ to\ the\ one\ set\ in\ this\ option\ at\ runtime str termcmd alacritty\ \ \ \ \ \ -e\ sh\ -c
command define-command wayland-terminal-window -params 1.. -docstring
here, wayland succeeds which you can see from the fact that wayland-terminal-window
is being defined.
I guess for you none of those windowing modules is detected successfully.
x11 is only detected if $DISPLAY
is set. Can you confirm it fails with fail DISPLAY is not set
?
@krobelus
Thank you for helping!
Run as kak -debug commands
When I run kak with debug option there is missing value
error:
Where can I find the args for -debug option?
Thank you!
You omitted commands
from
kak -debug commands
Ah, sorry. I was thinking commands
is a placeholder, like args
or something... Got it.
Can you confirm it fails with fail DISPLAY is not set?
Yes. Here is the debug output (this is what I receive when running kak from Alacritty and Terminal):
echo\ -debug\ 'no\ windowing\ module\ detected'\
command require-module tmux
command evaluate-commands fail\ tmux\ not\ detected
command fail tmux not detected
command require-module screen
command evaluate-commands fail\ screen\ not\ detected
command fail screen not detected
command require-module zellij
command evaluate-commands fail\ zellij\ not\ detected
command fail zellij not detected
command require-module kitty
command evaluate-commands fail\ Kitty\ not\ detected
command fail Kitty not detected
command require-module iterm
command evaluate-commands fail\ iTerm\ not\ detected
command fail iTerm not detected
command require-module sway
command evaluate-commands fail\ SWAYSOCK\ is\ not\ set
command fail SWAYSOCK is not set
command require-module wayland
command evaluate-commands fail\ WAYLAND_DISPLAY\ is\ not\ set
command fail WAYLAND_DISPLAY is not set
command require-module x11
command evaluate-commands fail\ DISPLAY\ is\ not\ set
command fail DISPLAY is not set
command require-module wezterm
command evaluate-commands fail\ wezterm\ not\ detected
command fail wezterm not detected
command echo -debug no\ windowing\ module\ detected
no windowing module detected
command autorestore-restore-buffer
command evaluate-commands
command new
Error: 1:1: 'new': 2:5: 'terminal': no such command
This is Kitty (does not work as well: no errors, but nothing happens):
command new
command terminal kak -c 27835 -e
command nop
And this is Term2, which works as expected:
command new
command terminal kak -c 27895 -e
command iterm-terminal-impl vertically kak -c 27895 -e
command nop
remote client connected: 5
right, macos does not set DISPLAY
, and loading x11.kak
would be wrong because it uses tools like xdotool
that presumably won't work.
I think we should create a quartz.kak
using similar terminal options as x11.kak
.
If you wanna try that, I think it can be mostly copy-pasted from x11.kak
except it should be loaded based on [ $(uname) = Darwin ]
or similar.
Also we can't use setsid
because I don't think that exists on macos but I think it's mostly fine without it.
My guess is that so far macos users have been using iterm and Terminal.app which have specific integrations in iterm.kak
and appleterminal.kak
.
Another one related issue: there is no 'terminal': no such command
error if I'm using iTerm2. But currently I'm experimenting with Kakoune client-server possibilities and it turns out that the :new
command works correctly in iTerm2 only if the Kakoune server was started manually from the interactive shell. If the Kakoune server was started by running the shell-script
cd "~"
/usr/local/bin/kak -d -s vk &
from Keyboard Maestro - I'm receiving the same 'terminal': no such command
error. (I just want to start headless Kakuone server at user login).
accepting connection failed: socket read failed: No such file or directory
remote client connected: 4
Error: 1:1: 'new': 2:5: 'terminal': no such command
remote client disconnected: 4
remote client connected: 4
Error: 1:1: 'new': 2:5: 'terminal': no such command
remote client disconnected: 4
remote client connected: 4
Error: 1:1: 'new': 2:5: 'terminal': no such command
Error: 1:1: 'e': wrong argument count
Error: 1:1: 'e': wrong argument count
Error: 1:1: 'e': wrong argument count
remote client disconnected: 4
remote client connected: 4
Error: 1:1: 'new': 2:5: 'terminal': no such command
Anything I can do about this?
Looks like the same issue.
Kakoune ships integrations for iterm, wayland, tmux etc.
If you lanuch it from outside any of those environments, it will not work.
If you want to make it work, build Kakoune from source, do something like cp rc/windowing/{wayland,quartz}.kak
, edit it as explained above and make sure to add it to rc/windowing/detection.kak
.
Ideally also share it upstream.
For some reason, kakoune doesn't use the terminal I want.
I fixed it by adding the following to the start of kakrc
.
set global windowing_modules 'x11'
require-module x11
set global termcmd 'kitty sh -c'
Question
Hi!
I'm trying to use
:new
command to create new Kakoune client in new window (Alacritty is a terminal emulator). Unfortunately this fires an error'terminal': no such command
:What should I add to
kakrc
to be able to create new Kakoune client in new window in Alacritty? I'm a little bit lost... ;(Thank you!