lf icon indicating copy to clipboard operation
lf copied to clipboard

lf stay working in background

Open OssNasr opened this issue 3 years ago • 5 comments

Im using lf in voidlinux musl base system, and after i press q, i still see lf in top, and if i issue another lf command and quit, i see two instances of lf working in background

2

OssNasr avatar Aug 18 '22 20:08 OssNasr

lf runs a server process that is kept running when a client quits. Search for the autoquit option in the documentation: https://pkg.go.dev/github.com/gokcehan/lf#section-documentation

lahwaacz avatar Aug 18 '22 20:08 lahwaacz

Ok, but im not running a server though, im logging in my machine on tty.

I mean, im using it as a main system from tty.

OssNasr avatar Aug 18 '22 21:08 OssNasr

That's not what he meant. When you open lf, lf starts two things, a "server" process, and the "gui" that you see. The gui that you see comunicates with the server. This is to enable several instances of lf to comunicate between each other, to past files from one to another for example (so each gui effectively comunicates with the server that passes responses between the guis)

The autoquit options makes sure that the server is killed when there are no more "guis" open. Is it weird that it is not on by default? Yes, but I guess it's to make startup faster, so you get some small bloat on your ram.

rafcon-dev avatar Aug 20 '22 12:08 rafcon-dev

Thanks for your explanation, it's clear for me now, and yes, i thought it might be reasonable for "autoquit" to be enabled by default, but you persuade me already about the server to be communicating with other instances of lf, its like a replacement for tabs i guess, its something like a taste for the developer... And it might be better than tabs too.

Thanks :)

OssNasr avatar Aug 20 '22 12:08 OssNasr

Yeah, I for example like to have two guis inside tmux side by side, so as to mimic a two pane manager like midnight commander for example. You're welcome!

rafcon-dev avatar Aug 20 '22 13:08 rafcon-dev

Infact I started liking the server way. Caz tabs are limited to a single client.

ghost avatar Oct 24 '22 13:10 ghost

@OssNasr If you want to use lf without starting a server, you can use the -single option. Although note that in this case you can't use some features that depend on the server such as lf -remote commands.

joelim-work avatar Jul 05 '23 05:07 joelim-work