HorlogeSkynet / archey4

:computer: Maintained fork of the original Archey (Linux) system tool
https://git.io/archey4
GNU General Public License v3.0
295 stars 37 forks source link

[FEATURE] Show multiple disks #55

Closed alferpal closed 4 years ago

alferpal commented 4 years ago

Hello.

Thank you so much for this project.

There's a feature from archey3 that I'd like to see if we could port over here:

Is your feature request related to a problem? Please describe. I have more than one disk in my laptop, each with more than one partition. And in archey3 it was possible to choose which partitions to display

Describe the solution you'd like A way to display more than 1 disk / partition in the archey output. This should probabble be exposed to the users via a config option for listing which partitions to report.

Describe alternatives you've considered I don't know enough of the project or python to consider myself able to suggest an approach.

Additional context archey3 config archey3 examples

EDIT: added archey3 examples page, which show better than the config one the way of displaying multiple partitions.

ingrinder commented 4 years ago

A good way to do this would probably be akin to neofetch, which has the configuration options disk_show and disk_subtitle:

Neofetch disk configuration section ``` # Which disks to display. # The values can be any /dev/sdXX, mount point or directory. # NOTE: By default we only show the disk info for '/'. # # Default: '/' # Values: '/', '/dev/sdXX', '/path/to/drive'. # Flag: --disk_show # # Example: # disk_show=('/' '/dev/sdb1'): # 'Disk (/): 74G / 118G (66%)' # 'Disk (/mnt/Videos): 823G / 893G (93%)' # # disk_show=('/'): # 'Disk (/): 74G / 118G (66%)' # disk_show=('/') # Disk subtitle. # What to append to the Disk subtitle. # # Default: 'mount' # Values: 'mount', 'name', 'dir', 'none' # Flag: --disk_subtitle # # Example: # name: 'Disk (/dev/sda1): 74G / 118G (66%)' # 'Disk (/dev/sdb2): 74G / 118G (66%)' # # mount: 'Disk (/): 74G / 118G (66%)' # 'Disk (/mnt/Local Disk): 74G / 118G (66%)' # 'Disk (/mnt/Videos): 74G / 118G (66%)' # # dir: 'Disk (/): 74G / 118G (66%)' # 'Disk (Local Disk): 74G / 118G (66%)' # 'Disk (Videos): 74G / 118G (66%)' # # none: 'Disk: 74G / 118G (66%)' # 'Disk: 74G / 118G (66%)' # 'Disk: 74G / 118G (66%)' disk_subtitle="mount" ```

I think we should consider implementing something like the following.

New section in config.json:

"disk": {
    "show_disks": [
        "local"
    ],
    "combine_disks": true,
    "disk_labels": "mountpoints",
    "prepend_disk": true
}

Where:

However, given the current output implementation this would be a pretty big task to complete. My current thoughts would be to modify the Output class so that rather than using each entry's key as its name, we pass a copy of output to each module and let each handle output individually, allowing for better customisability of each module's output. Of course, this requires modifying every single module to support it - is it worth the trouble? If anyone has any better ideas, I'd love to hear them 😃.

HorlogeSkynet commented 4 years ago

Closing here as a very promising implementation is on its way (#67) !

HorlogeSkynet commented 4 years ago

Hey @alferpal, v4.8.0 has (finally) been released yesterday, including the multiple Disk entry feature. Sorry for being late. Bye 👋

alferpal commented 4 years ago

Thanks!