I'm not sure if this is indeed wrong

I’ve been hours trying to figure out why my terminal command wasn’t set to kitty-terminal, even though it’s something that should work without me doing anything. I thought some commands from connect.kak were not working properly.

I believe the issue is here:

hook global KakBegin .* %sh{
    if [ -n "$DISPLAY" ] && [ -z "$TMUX" ]; then
        echo "require-module x11"
    fi
}
hook -group kitty-hooks global KakBegin .* %sh{
    if [ "$TERM" = "xterm-kitty" ] && [ -z "$TMUX" ]; then
        echo "require-module kitty"
    fi
}

The checks inside x11.kak don’t seem to be strong enough. In particular, kakoune’s requiring both the x11 module and kitty’s module. As a result, in one of my machines the x11 module happens to be loaded afterwards and the terminal command is set to x11-terminal instead of kitty-terminal.

Can anybody confirm?

There was this PR that seems to address exactly this issue, although it has stalled a bit.

1 Like

There’s a fix available, but it’s a much more difficult question than I originally thought when I posted that pull request - I think we’ve got a solution that resolves the main issues, but it’s not entirely clear if it’s acceptable, or works the way it should for all possible situations.

Right now you should be able to work around the problem by manually specifying the right terminal alias inyour kakrc.

2 Likes

I happened to only look through issues :slight_smile:. I will follow the conversation there.