nokyan / resources

Keep an eye on system resources
GNU General Public License v3.0
708 stars 56 forks source link

Change icons for storage devices #170

Open CiscoDeTours opened 7 months ago

CiscoDeTours commented 7 months ago

Is there an existing issue for this?

Is your feature request related to a problem? Please describe.

Drives

Version 1.3.0 displays an internal drive icon that doesn't match the representation of these kind of devices like the external one does.

Describe the solution you'd like

NEWdrives

Describe alternatives you've considered

None.

Additional context

Nothing to add.

nokyan commented 7 months ago

Hi, thanks for the issue. When deciding which icon to use for which drive, Resources only considers whether a drive is external (i. e. removable) as a last resort and tries to find other clues first. In short, the algorithm for it works like that:

  1. Try to match the block device name to a device, e. g. sr0 is always going to be a CD/DVD/Blu-ray drive
  2. Is the drive "rotational"? Then it's an HDD, use the HDD icon (the icon currently used for your 8 GB drive)
  3. If not, is it removable? Then use the flash drive icon, otherwise it's probably an SSD, use the SSD icon (the icon currently used for your other drives)

Your 8 GB flash drive has the same issue as my 32 GB one, in that they're recognized by the kernel as "rotational", which Resources uses as a clue to assume they are HDDs, hence the wrong icon. The icons for your 1 TB and 4 TB drives are used for (presumed internal) SSDs. They are working as intended (I'm assuming that your drives are SSDs, if not, tell me).

CiscoDeTours commented 7 months ago

I understand that icon's selection works automatically thanks to your explanation. Although SSD assignment is correct, my suggestion aims to change its icon to an aesthetically better one like HDD which I confirm is wrongly assigned to external drives as you mention.