muesli / duf

Disk Usage/Free Utility - a better 'df' alternative
Other
12.9k stars 403 forks source link

feature request: stay "open" and autorefresh like htop #141

Open c33s opened 3 years ago

c33s commented 3 years ago

it would be awesome duf beeing able to stay open and auto refresh its output in a customizable interval.

so i could "monitor" which partition gets full while for example upgrading the system (very useful for systems with extra small partitions to keep the image small).

c33s commented 3 years ago

it works quite ok with watch -n 1 duf but the sweet ### bars are gone.

jrwren commented 3 years ago

You can get the ### by telling duf the width to use.

watch duf -width $COLUMNS

When run through watch, wuf thinks that its output isn't a terminal and so defaults to 80column width which excludes the ### bars.

Now if only there were a way to force color the same way.

jrwren commented 3 years ago

I just put up PR #141 with which you can force color. It requires you to use watch -c to interpret the color.

watch -c duf -C -width $COLUMNS works well for me.

mrngm commented 3 years ago

I've added #146 that implements the requested feature. If there's anything missing, or could be improved, let me know!

c33s commented 3 years ago

awesome, will test it as soon as you release it. have you planned a release in the next time (have seen that the last release was quite a while ago)?

c33s commented 3 years ago

@mrngm a config file could be handsome. i would prefer to use duf similar to htop and dont have to remember command line switches. so a config where i can define that if i call duf it is always with --refresh=1 would be helpful.

jrwren commented 3 years ago

@mrngm a config file could be handsome. i would prefer to use duf similar to htop and dont have to remember command line switches. so a config where i can define that if i call duf it is always with --refresh=1 would be helpful.

Your shell alias can do this. Add alias duf="duf --refresh=1" to your .bashrc file.

mrngm commented 3 years ago

@mrngm a config file could be handsome. i would prefer to use duf similar to htop and dont have to remember command line switches. so a config where i can define that if i call duf it is always with --refresh=1 would be helpful.

That could be handy indeed, but that is outside the scope of this issue. Besides, I'm just a mere contributor, not the project maintainer :)