Skip to content

Commit bc776a0

Browse files
authored
fix: refresh disk and network stats (#11)
1 parent 572dfdd commit bc776a0

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "stats_provider"
3-
version = "0.6.0"
3+
version = "0.6.1"
44
description = "A simple system stats event provider for Sketchybar."
55
edition = "2021"
66
build = "build.rs"

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ async fn get_stats(cli: &cli::Cli, sketchybar: &Sketchybar) -> Result<()> {
5050
let mut commands: Vec<String> = Vec::new();
5151
tokio::time::sleep(tokio::time::Duration::from_secs(cli.interval.into())).await;
5252
system.refresh_specifics(refresh_kind);
53+
disks.refresh();
54+
networks.refresh();
5355

5456
if cli.all {
55-
disks.refresh();
56-
networks.refresh();
5757
commands.push(get_cpu_stats(&system, &cli::all_cpu_flags()).join(""));
5858
commands.push(get_disk_stats(&disks, &cli::all_disk_flags()).join(""));
5959
commands.push(get_memory_stats(&system, &cli::all_memory_flags()).join(""));

0 commit comments

Comments
 (0)