martanne / dvtm

dvtm brings the concept of tiling window management, popularized by X11-window managers like dwm to the console. As a console window manager it tries to make it easy to work with multiple console based programs.
MIT License
853 stars 106 forks source link

Alt backspace doesn't work with `zsh` #36

Closed lenormf closed 7 years ago

lenormf commented 7 years ago

Hi,

I haven't investigated this issue, all I can say is that I'm using zsh with dvtm 0.15 and alt-backspace inserts a newline instead of doing a ^W.

Thanks.

ghost commented 7 years ago

Not only that, also when dvtm if first started in st the title reads dvtm and even though following is present in .zshrc title is never updated on command execution, after pressing alt-backspace though title is updated properly and continues to function as intended

.zshrc portion xtitle () { printf "\033]0;$1\007" } precmd () { xtitle "${PWD}" }

ghost commented 7 years ago

The issue is not limited to zsh/st. As alt-backspace doesn't work in linux console too, following crude hack does "fix" things for me:

diff --git a/dvtm.c b/dvtm.c index 434c0af..e8c1e65 100644 --- a/dvtm.c +++ b/dvtm.c @@ -881,7 +881,10 @@ keypress(int code) { if (is_content_visible(c)) { c->urgent = false; if (code == '\e')

ghost commented 7 years ago

Here: https://github.com/martanne/dvtm/blob/master/dvtm.c#L883

You may need to edit the comment and add ``` before and after the diff to prevent github to mess it up.

ghost commented 7 years ago

Josuah Demangeon⠠⠵ notifications@github.com writes:

Here: https://github.com/martanne/dvtm/blob/master/dvtm.c#L883

You may need to edit the comment and add \``` before and after the diff to prevent github to mess it up.

Thanks. I already created local dvtm mirror earlier:

https://github.com/moosotc/dvtm/commit/9edb011113e08707137b0dbd3f5eac2b3859cb75

-- mailto:moosotc@gmail.com

ghost commented 7 years ago

Nice. This patch makes sense to me: it could be a feature of dwm: converting alt-backspace to ctrl + w.

The st term converts Scroll up and Scroll down mouse events to Ctrl e and Ctrl y to scroll in vim and less.

ghost commented 7 years ago

Josuah Demangeon⠠⠵ notifications@github.com writes:

Nice. This patch makes sense to me: it could be a feature of dwm: converting alt-backspace to ctrl + w.

Glad you liked it.

Thes st term converts Scroll up and Scroll down mouse events to Ctrl e and Ctrl y to scroll in vim and less.

Hm... It probably needs some configuration (i.e. doesn't work out of the box for me here)

-- mailto:moosotc@gmail.com

ghost commented 7 years ago

@moosotc

$ which st
/usr/bin/st

You are right, it was the system one, probably with this config file.