i3status-rust
i3status-rust copied to clipboard
Add block for libvirtd/qemu
Why
I find it sometimes useful on my desktop to understand how many VMs I have running or that are paused/stopped at a glance.
What
a simple libvirt integration to count the number of running instances; optionally you can use format to display.
- "paused" (suspended)
- "stopped" (destroyed) domains
- and a count of the images in the local disk store (such as virtual harddisks and ISOs, will count all activated storage).
Due to the crate virt using a lot of unsafe, I figure it's best to keep it as an optional include.
I chose the icon 'copy' for the bar, as that closely resembles vmware's iconography.
Hrm, it seems like it's more likely to crash with the new error handling.
(I'm testing by restarting libvirtd repeatedly)
Due to the crate virt using a lot of unsafe, I figure it's best to keep it as an optional include.
It doesn't add any new dependencies and the unsafe code would only be called if you're using the block so I'd say it's OK the other way as well.
It doesn't add any new dependencies
Unfortunately it does: https://github.com/greshake/i3status-rust/pull/1471/commits/54223fb9f4cb63a7e943984879cfb537eb992e53
Ah, then I take it back.
Would be nice if there was a dlopen version...
Once compiled libvirt-dev is not needed (if that's the question).
It's a build-time dependency.
@dijit can you rebase please?
The Block trait changed, see the definition here. In short, id() was removed and name() was added.
block_error function was removed, see what's available here. In short, instead of .block_error(<block>, <msg>)? use .error_msg(<msg>)?.
Closing due to lack of activity