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

Automatically refresh mount information with --refresh CLI option #146

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mrngm
Copy link
Contributor

@mrngm mrngm commented Oct 31, 2021

In #141, an automatic refresh was requested. This PR adds a command line option where you can specify an interval (using Go's time.Duration syntax) that clears the screen, refreshes the mount information, and displays the new information. Mounts given on the command line are preserved as well.

For example:

$ ./duf --refresh 5s /tmp

outputs:

image

Fixes: #141

@mrngm mrngm changed the title 141 auto refresh Automatically refresh mount information with --refresh CLI option Oct 31, 2021
@muesli muesli added the enhancement New feature or request label Dec 19, 2021
@muesli
Copy link
Owner

muesli commented Feb 1, 2022

Nice implementation, but I'm still a bit torn on this one. We're basically just re-implementing watch here 😄

Do you see any real benefits to implementing this in duf directly as compared to:

CLICOLOR_FORCE=1 COLORTERM="yes" watch -c duf

I guess the color handling is a bit nicer, because we can ensure RGB rendering. Possibly something we could improve on in termenv however.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feature request: stay "open" and autorefresh like htop
2 participants