diff --git a/docs/index.html b/docs/index.html index 4854fe7..8771297 100644 --- a/docs/index.html +++ b/docs/index.html @@ -130,7 +130,7 @@

Process Management

Download for macOS

Choose the version that matches your Mac

- 💻
@@ -138,7 +138,7 @@

Download for macOS

For Intel-based Macs
- 🍎
diff --git a/package.json b/package.json index 1af935c..d1ed122 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "macos-task-manager", - "version": "1.0.3", + "version": "1.0.4", "description": "", "type": "module", "scripts": { diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index e6668e3..7c4b2b3 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -2009,7 +2009,7 @@ dependencies = [ [[package]] name = "macos-task-manager" -version = "1.0.3" +version = "1.0.4" dependencies = [ "serde", "serde_json", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index feea1ba..bacb17f 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "macos-task-manager" -version = "1.0.3" +version = "1.0.4" description = "A Tauri App" authors = ["you"] edition = "2021" diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 224932e..d3c9c79 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -121,14 +121,19 @@ async fn get_processes(state: State<'_, AppState>) -> Result<(Vec, *last_update = (current_time, current_rx, current_tx); - // Calculate total disk usage - let disk_stats = sys.disks().iter().fold((0, 0, 0), |acc, disk| { - ( - acc.0 + disk.total_space(), - acc.1 + disk.total_space() - disk.available_space(), - acc.2 + disk.available_space() - ) - }); + // Calculate total disk usage - only for physical disks + let disk_stats = sys.disks().iter() + .filter(|disk| { + // Filter for physical disks - typically those mounted at "/" + disk.mount_point() == std::path::Path::new("/") + }) + .fold((0, 0, 0), |acc, disk| { + ( + acc.0 + disk.total_space(), + acc.1 + disk.total_space() - disk.available_space(), + acc.2 + disk.available_space() + ) + }); system_stats = SystemStats { cpu_usage: sys.cpus().iter().map(|cpu| cpu.cpu_usage()).collect(), diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 28a8c1c..68355cc 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -8,7 +8,7 @@ }, "package": { "productName": "NeoHtop", - "version": "1.0.3" + "version": "1.0.4" }, "tauri": { "allowlist": {