Initial commit

This commit is contained in:
Lncvrt committed 2026-04-14 19:25:29 -07:00
commit b5d569e326
35 files changed
+528

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
/target/
/Cargo.lock
/gen/schemas
+30
View File
@@ -0,0 +1,30 @@
[package]
name = "disksense"
version = "0.1.0"
authors = ["Lncvrt"]
edition = "2024"
[lib]
name = "disksense_lib"
crate-type = ["staticlib", "cdylib", "rlib"]
[build-dependencies]
tauri-build = { version = "2.5.6", features = [] }
[dependencies]
tauri = { version = "2.10.3", features = ["macos-private-api"] }
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.149"
[target.'cfg(any(target_os = "windows", target_os = "macos"))'.dependencies]
window-vibrancy = "0.7.1"
[target.'cfg(target_os = "windows")'.dependencies]
windows-version = "0.1.7"
[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
strip = true
panic = "abort"
+3
View File
@@ -0,0 +1,3 @@
fn main() {
tauri_build::build()
}
+9
View File
@@ -0,0 +1,9 @@
{
"$schema": "../gen/schemas/desktop-schema.json",
"identifier": "default",
"description": "Capability for the main window",
"windows": ["main"],
"permissions": [
"core:default"
]
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 974 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 903 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

+62
View File
@@ -0,0 +1,62 @@
use tauri::{WebviewUrl, WebviewWindowBuilder};
#[cfg(target_os = "macos")]
use window_vibrancy::{NSVisualEffectMaterial, apply_vibrancy};
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
.invoke_handler(tauri::generate_handler![])
.setup(|app| {
#[allow(unused)]
let mut transparency = false;
#[cfg(target_os = "macos")]
{
transparency = true;
}
#[cfg(target_os = "windows")]
{
transparency = windows_version::OsVersion::current()
>= windows_version::OsVersion::new(10, 0, 0, 22000);
}
let window = WebviewWindowBuilder::new(
app,
"main",
WebviewUrl::App(
format!(
"/{}",
if transparency {
"?transparent=true"
} else {
""
}
)
.into(),
),
)
.title("DiskSense")
.inner_size(800.0, 600.0)
.transparent(transparency)
.visible(false)
.build()?;
#[cfg(target_os = "macos")]
apply_vibrancy(&window, NSVisualEffectMaterial::HudWindow, None, None)
.expect("Unable to apply window blur");
#[cfg(target_os = "windows")]
if transparency {
window_vibrancy::apply_mica(&window, Some(true))
.expect("Unable to apply window blur");
}
window.show().unwrap();
Ok(())
})
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
+5
View File
@@ -0,0 +1,5 @@
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
fn main() {
disksense_lib::run()
}
+34
View File
@@ -0,0 +1,34 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "DiskSense",
"version": "0.1.0",
"identifier": "xyz.lncvrt.disksense",
"build": {
"beforeDevCommand": "bun run dev",
"devUrl": "http://localhost:1420",
"beforeBuildCommand": "bun run build",
"frontendDist": "../dist"
},
"app": {
"macOSPrivateApi": true,
"withGlobalTauri": true,
"windows": [],
"security": {
"csp": null
}
},
"bundle": {
"active": true,
"targets": "all",
"icon": [
"icons/32x32.png",
"icons/128x128.png",
"icons/128x128@2x.png",
"icons/icon.icns",
"icons/icon.ico"
],
"macOS": {
"minimumSystemVersion": "13.0"
}
}
}