General clean up

This commit is contained in:
Mahesh Asolkar 2025-06-07 21:53:32 -07:00
parent aeefa114e6
commit be96618f76
Signed by: asolkar
GPG Key ID: 371CA8164433BDCC
2 changed files with 15 additions and 13 deletions

View File

@ -7,12 +7,14 @@ Simple bar written in Rust
* A tool that returns variety of components in a string suitable to use in a * A tool that returns variety of components in a string suitable to use in a
status bar status bar
* Currently implemented modules: * Currently implemented modules:
- weather - date
- memory
- music - music
- network - network
- memory
- cpu
- power - power
- time
- weather
- cpu
# Usage # Usage

View File

@ -74,16 +74,16 @@ impl UnibarModuleCpu {
// -------------------- // --------------------
// cpu 242109 7 60985 6538626 8344 39138 9647 0 0 0 // cpu 242109 7 60985 6538626 8344 39138 9647 0 0 0
// * user time spent in user mode // * user - time spent in user mode
// * nice time spent processing nice processes in user mode // * nice - time spent processing nice processes in user mode
// * system time spent executing kernel code // * system - time spent executing kernel code
// * idle time spent idle // * idle - time spent idle
// * iowait time spent waiting for I/O // * iowait - time spent waiting for I/O
// * irq time spent servicing interrupts // * irq - time spent servicing interrupts
// * softirq time spent servicing software interrupts // * softirq - time spent servicing software interrupts
// * steal time stolen from a virtual machine // * steal - time stolen from a virtual machine
// * guest time spent running a virtual CPU for a guest operating system // * guest - time spent running a virtual CPU for a guest operating system
// * guest_nice time spent running a virtual CPU for a “niced” guest operating system // * guest_nice - time spent running a virtual CPU for a “niced” guest operating system
fn read_cpu_times(&self) -> io::Result<CpuTimes> { fn read_cpu_times(&self) -> io::Result<CpuTimes> {
let file = File::open("/proc/stat")?; let file = File::open("/proc/stat")?;
let reader = BufReader::new(file); let reader = BufReader::new(file);