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
843 stars 108 forks source link

Cannot mask stty start and stop #100

Closed jarun closed 3 years ago

jarun commented 4 years ago

I am starting dvtm with 2 panes using the following function:

n2 ()
{
    dvtm -m '^B' "nnn -cdHnr $@" "nnn -cdHnr $@"
}

However, ^Q doesn't work in nnn.

The following works:

dvtm
stty start undef
stty stop undef
nnn

How can I make ^Q work when I start with 2 panes?

GReagle commented 3 years ago

I just installed nnn (Debian Stable package 2.2-2) and it does not recognize any of the options -cdHnr. Weird. Anyway . . .

I think that the proper way to disable flow control is stty -ixon. This works: dvtm "stty -ixon; nnn" "stty -ixon; nnn"

You could also write a shell script (or maybe function) wrapper for nnn that does stty -ixon; nnn

jarun commented 3 years ago

@GReagle did you check the latest version number from nnn?

GReagle commented 3 years ago

@GReagle did you check the latest version number from nnn?

Nope. I don't use nnn. It doesn't seem relevant to this issue. If it is relevant, please correct me.

jarun commented 3 years ago

OK. I thought you had issues starting nnn.

I will check this out. Thanks!

jarun commented 3 years ago

Works fine! Thanks!

Also, is there are way to logout of the second level shell directly (like in tmux)?

To explain, when I run an instance of nnn as dvtm "stty -ixon; nnn" and I quit nnn, I fall into a nested shell. I have to press ^D to come out to the top level shell from where I ran the dvtm command. I would like to skip the additional ^D.

GReagle commented 3 years ago

No I do not know how to get dvtm to refrain from opening a new shell after its command-line commands have been closed, without modifying the dvtm source code. I do not know a work-around either. Would you be willing to search the issues to see if there is already an issue for it? If not, I recommend you create a new issue for it.

By the way, in case it is useful, you could exit your last dvtm window the ^g q q.

jarun commented 3 years ago

Thanks! It's not a big inconvenience. Given that this current issue was raised a 1.5 yrs ago and the number of outstanding defects, the project appears unmaintained.

Closing the current defect as the solution works fine. Thanks again!