-
-
Notifications
You must be signed in to change notification settings - Fork 210
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
Multiple disks support #224
base: main
Are you sure you want to change the base?
Conversation
Adding support for multiple disks/partitions, by adding the possibility to set multiple disk in the stats section of the theme.yaml, each referenced by its mount point (e.g. drive letter on windows). Unfortunately, it forces changes to the theme.yaml format that breaks compatibility with previous versions.
Removal of an unnecessary print
Hello, Maybe the code in if config.THEME_DATA['STATS']['DISK'].get("MOUNTS", False):
for mount in config.THEME_DATA['STATS']['DISK']['MOUNTS']:
mountpoint = [k for k, v in mount.items()][0]
_display_partition(mountpoint=mountpoint, theme_data=mount[mountpoint]) # A new function where you check if the mountpoint exist and then display it
else:
_display_partition(mountpoint="/", theme_data=config.THEME_DATA['STATS']['DISK']) Please note I did not test this code. |
I would love to have this feature and try the code out but unfortunately the code in stats.py was changed a lot in v3.4.0 and im not that good in programming to adjust the code myself. |
Please add this feature for Linux. This is very necessary with NAS having multiple disks. I have bought the screen for this exact purpose and I cannot find a way to show all disks. Activity and free space is necessary. And if possible adding the disks temperature it would be much better. |
I have installed this commit to have multiple disk support. How can I add more disks? Inside res/themes/Terminal/theme.yaml there is this section:
and I need to add these:
besides the use of the graphical editor, the wiki is not very explicit about this. Any help would be very appreciated. |
any chance this will be implemented? would really like to be able to show multiple partitions/disks and smandon's multiple disk fork is too old to support my display |
Hi,
I made some modifications to add support for multiple disks/partitions, by adding the possibility to set multiple disks in the stats section of the theme.yaml, each referenced by its mount point (e.g. drive letter on windows).
Unfortunately, it forces changes to the theme.yaml format that breaks compatibility with previous versions.
I changed the sensors disk functions to add a "path" parameter that is used with psutil.disk_usage.
Stats was modified to add the mountpoint from theme.yaml in the disk functions calls. It also checks if the mount points path exists each time the stats() method is called, which for now spams the logs with a warning, maybe this could be handled better, but at least the program wouldn't crash if a disk/partition becomes unavailable or is unmounted.
The config's load_theme function had to be adapted to handle default values for disks via a seperate "default_disk.yaml" file.
All the default themes were modified accordingly, using "/" as mount point, as it was the case so far.
I think that it should work on all platforms, I tested only on windows.
Pay attention to the theme.yaml, for each disk definition there is a necessary double indent, due to a subtlety of the yaml format.