7696122 / evil-terminal-cursor-changer

:smiling_imp: Chagning cursor by mode for evil on terminal.
81 stars 12 forks source link

Support for custom terminal recognition #24

Closed steeni closed 2 years ago

steeni commented 4 years ago

I'm using alacritty in windows with wsl2 where I use emacs inside tmux. Terminal recognition doesn't work for this setup and thus cursor doesn't change. However alacritty is using same escape sequences as xterm (as far as I know).

As a workaround, I have set XTERM_VERSION to some value before emacs start and then the cursor changer works. I have not tried colors but at least the shape changes as expected.

I believe it might be impossible to make a perfect terminal recognition, so maybe it would make sense that users could choose the escape sequence setup that they want (for example set it xterm-compatible).

aaronbieber commented 2 years ago

I, too, struggled with this package not working for me in Windows Terminal, though xterm escape sequences do work. An environment variable to look for to identify Windows Terminal could be WT_PROFILE_ID.

Though I think the better way to resolve this is to simply define a custom setting called "terminal type" and allow the user to select "xterm" so it forces the selected sequence to be used.