diskonaut icon indicating copy to clipboard operation
diskonaut copied to clipboard

Feature: option to include free disk space

Open jansegre opened this issue 5 years ago • 6 comments

This may only make sense when scanning whole mounts, but it would be nice to have a visual feedback no how much free space there is. It could start as something as simples as a special node/branch that accounts for what df would returnn on the given path. Like diskonaut /foo/bar would include a special colored "free space" with the size of df /foo/bar.

jansegre avatar Jun 17 '20 19:06 jansegre

This may only make sense when scanning whole mounts,

I don't think so. I was just specifically using this tool to free up space on a drive that had run out of space, but I know which folders I can afford to delete stuff from, so I'm not working on the whole drive. Knowing when I have freed enough to make me comfortable, without having to leave the tool and df -h would be nice.

It's a great idea.

zicklag avatar Jun 17 '20 23:06 zicklag

I like this idea. I can't imagine how we can have a visual "graphical" representation of free space in anything except scanning a whole drive. After all, the free space if in the drive, not in a particular folder. Otherwise I'd think we would have a "free space" tile in every folder, having it mostly blot out the contents of smaller folders.

How about if we include it as part of the title line? Right now the title line has a "freed" section which shows you how much space you've freed in this session. Maybe we could add something like: Free space in /: 50G to the title? And then have diskonaut detect which drive the folder you're scanning is on and present it? So that (for example) if I'm scanning /home/aram which is on the /home partition, I'll see Free space in /home: 50GB in the title line?

What do you think?

imsnif avatar Jun 18 '20 09:06 imsnif

That sounds perfect.

zicklag avatar Jun 18 '20 14:06 zicklag

That's exactly what df does. If the given path is not a drive/filesystem it tries to figure out what drive/filesystem the file is from. From the manual:

df [-b | -h | -H | -k | -m | -g | -P] [-ailn] [-t] [-T type] [file | filesystem ...] The df utility displays statistics about the amount of free disk space on the specified filesystem or on the filesystem of which file is a part.

jansegre avatar Jun 19 '20 00:06 jansegre

What do you think of an (optional?) ui element indicating where you would be if you deleted a folder? Something like

Free space in /: 50G  --------------------------> 39.5G
                          <CTRL-D> Desktop/ 10.4G

That way users could avoid mental math and the rounding error from the displayed numbers would matter less.

dbramucci avatar Jun 19 '20 04:06 dbramucci

@dbramucci - I really like that idea. The realestate in the title is a little scarce though. Would you like to open a separate issue to discuss the details?

imsnif avatar Jun 19 '20 11:06 imsnif