Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option that provides a sh command to format status bar #112

Closed
EmmChriss opened this issue Oct 30, 2018 · 4 comments · Fixed by #1257
Closed

Add option that provides a sh command to format status bar #112

EmmChriss opened this issue Oct 30, 2018 · 4 comments · Fixed by #1257

Comments

@EmmChriss
Copy link

No description provided.

@gokcehan
Copy link
Owner

gokcehan commented Nov 1, 2018

@EmmChriss We can add an option to customize the format of the status line. I think you also want to run arbitrary shell commands within this status line format. Do you have a use case in mind?

@EmmChriss
Copy link
Author

I believe there'd be many use cases, but the specific one I'd like to implement is the disk usage of folders with du
It would also be useful to make lf git aware

@EmmChriss
Copy link
Author

I believe the more options of customizations are added to a barebones app like lf, the better

@camoz
Copy link

camoz commented Nov 11, 2022

I believe the more options of customizations are added to a barebones app like lf, the better

A possible disadvantage is that the additional code has to be maintained. Also, running du for every selected folder seems very inefficient, provided that one usually only sometimes need that information. ranger has a nice feature where when you press dc on a selected folder (which runs get_cumulative_size), the cumulative size of the folder is shown next to the folder name. Such an on demand behavior would be better suited for something like du, IMO.

Also, I'm not sure how this is supposed to work, but isn't the status line updated on every new selection / cursor move? Would that mean that a sh process would be spawned on each cursor move, for updating the status line? That sounds quite inefficient to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants