-
Notifications
You must be signed in to change notification settings - Fork 5
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
OS and Linux distribution support requests #4
Comments
You can use wmic logicaldisk get Caption,Size,Freespace,Name,Filesystem /FORMAT:csv
Node,Caption,FileSystem,FreeSpace,Name,Size
BensPC,C:,NTFS,50240790528,C:,249083572224
BensPC,D:,NTFS,509776490496,D:,3000457228288
wmic os get TotalVisibleMemorySize, FreePhysicalMemory /FORMAT:csv
Node,FreePhysicalMemory,TotalVisibleMemorySize
BensPC,10777156,16706896 Unfortunately, |
This might be my machine only, though. I have a network share mounted, but the server is offline. Windows still tries to reach it, check its properties, and times out after some seconds. This might also impede other solutions on other operating systems, e.g. (defcustom eshell-info-banner-partition-windows-volumes
(mapcar (lambda (x) (format "%c:" x)) (number-sequence ?C ?F))
"Checked drive letters for volume measurements."
:group 'eshell-info-banner
:type '(repeat (string :tag "Volume letter")))
(defun windows-size-example ()
"Returns a plist of the drives in `eshell-info-banner-partition-windows-volumes' with
their respective sizes.
For every drive in the aforementioned variable, the resulting plist contains the
following properties:
label LABEL: the entry from `eshell-info-banner-partition-windows-volumes'
free BYTES: either the number of available bytes or nil
size BYTES: either the total disk size or nil on error
In order to format the bytes, you can use `file-size-human-readable-iec'."
(mapcar (lambda (d)
(let* ((info (file-system-info d))
(size (and info (nth 0 info)))
(free (and info (nth 1 info))))
`(label ,d size ,size free ,free)))
eshell-info-banner-partition-windows-volumes))
(mapconcat (lambda (x)
(if (plist-get x 'size)
(format "Drive %s %s / %s\n"
(plist-get x 'label)
(file-size-human-readable-iec (plist-get x 'free))
(file-size-human-readable-iec (plist-get x 'size)))
""))
(windows-size-example)
"") The resulting string on the example above would be
Again, feel free to ping me if I should prepare a PR based on the solution above or |
Hello,
Apologies for the (very) late answer.
I’ll admit I’m a bit reluctant on using wmic since it is deprecated,
and as you pointed out it is not reliable. But I guess it could work
for some users, so something that could be done is another custom
variable like `eshell-info-banner-display-windows-partitions-p` so
that eshell-info-banner displays Windows partitions only when non-nil.
That way if it is too unreliable for some users, or even if it gets
removed entirely in future Windows updates, users can simply turn it
off and people for whom it works and/or who use older Windows versions
will still be able to use it.
|
Looks like Mac os has versions |
It shold be, indeed. Are those still macOS Big Sur, or is it a new name?
…--
Lucien “Phundrak” Cartier-Tilet
<https://phundrak.com> (Français)
<https://phundrak.com/en> (English)
Sent from GNU/Emacs
|
Still Big Sur :) |
Alright, I’m updating the list. Thanks for your help!
…--
Lucien “Phundrak” Cartier-Tilet
<https://phundrak.com> (Français)
<https://phundrak.com/en> (English)
Sent from GNU/Emacs
|
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
While #2 standardized the retrieval of the name of the running Linux distribution,
eshell-info-banner.el
has yet to support non-standard Linux distributions (such as GUIX) and non-Linux OSes, such as macOS and Windows.Here will be listed Linux distributions and OSes not yet supported:
Link to keep up with macOS versions
duf
is installed on the system, d35516aThis list is subject to changes in the future, by shrinking or expanding.
The text was updated successfully, but these errors were encountered: