Re-organize project
- 3 Crates: - UI: Move existing crate - Daemon: Init binary crate - Config: Init library crate
This commit is contained in:
parent
971ecf4200
commit
7659b22dd6
30
Cargo.toml
30
Cargo.toml
@ -1,23 +1,7 @@
|
||||
[package]
|
||||
name = "popcorn"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
description = "Cute and simple OSD popups on your desktop"
|
||||
readme = "README.md"
|
||||
repository = "https://git.candifloss.cc/candifloss/popcorn.git"
|
||||
authors = ["Candifloss <candifloss.cc>"]
|
||||
categories = ["Desktop", "GUI"]
|
||||
license-file = "LICENSE"
|
||||
homepage = "https://git.candifloss.cc/candifloss/popcorn.git"
|
||||
keywords = ["OSD", "popup", "desktop", "gui", "slint"]
|
||||
license = "GPL-3+"
|
||||
|
||||
[dependencies]
|
||||
dirs = "6.0.0"
|
||||
i-slint-backend-winit = "1.14.1"
|
||||
serde_json = "1.0.145"
|
||||
slint = "1.14.1"
|
||||
toml = "0.9.8"
|
||||
|
||||
[build-dependencies]
|
||||
slint-build = "1.14.1"
|
||||
[workspace]
|
||||
resolver = "3"
|
||||
members = [
|
||||
"crates/popcorn",
|
||||
"crates/popcorn-d",
|
||||
"crates/popcorn-conf",
|
||||
]
|
||||
13
crates/popcorn-conf/Cargo.toml
Normal file
13
crates/popcorn-conf/Cargo.toml
Normal file
@ -0,0 +1,13 @@
|
||||
[package]
|
||||
name = "popcorn-conf"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
description = "Configuration structures and loader for Popcorn OSD."
|
||||
license = "GPL-3+"
|
||||
|
||||
[dependencies]
|
||||
dirs = "6.0.0"
|
||||
serde = { version = "1.0.228", features = ["derive"] }
|
||||
thiserror = "2.0.17"
|
||||
toml = "0.9.8"
|
||||
|
||||
15
crates/popcorn-conf/src/lib.rs
Normal file
15
crates/popcorn-conf/src/lib.rs
Normal file
@ -0,0 +1,15 @@
|
||||
#[must_use]
|
||||
pub fn add(left: u64, right: u64) -> u64 {
|
||||
left + right
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn it_works() {
|
||||
let result = add(2, 2);
|
||||
assert_eq!(result, 4);
|
||||
}
|
||||
}
|
||||
10
crates/popcorn-d/Cargo.toml
Normal file
10
crates/popcorn-d/Cargo.toml
Normal file
@ -0,0 +1,10 @@
|
||||
[package]
|
||||
name = "popcorn-d"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
description = "Popcorn OSD daemon to watch for system events."
|
||||
license = "GPL-3+"
|
||||
|
||||
[dependencies]
|
||||
serde = { version = "1.0.228", features = ["derive"] }
|
||||
tokio = { version = "1.48.0", features = ["full"] }
|
||||
26
crates/popcorn/Cargo.toml
Normal file
26
crates/popcorn/Cargo.toml
Normal file
@ -0,0 +1,26 @@
|
||||
[package]
|
||||
name = "popcorn"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
description = "Cute and simple OSD popups on your desktop"
|
||||
readme = "README.md"
|
||||
repository = "https://git.candifloss.cc/candifloss/popcorn.git"
|
||||
authors = ["Candifloss <candifloss.cc>"]
|
||||
categories = ["Desktop", "GUI"]
|
||||
homepage = "https://git.candifloss.cc/candifloss/popcorn.git"
|
||||
keywords = ["OSD", "popup", "desktop", "gui", "slint"]
|
||||
license = "GPL-3+"
|
||||
build = "build.rs"
|
||||
|
||||
[dependencies]
|
||||
dirs = "6.0.0"
|
||||
i-slint-backend-winit = "1.14.1"
|
||||
serde_json = "1.0.145"
|
||||
slint = "1.14.1"
|
||||
toml = "0.9.8"
|
||||
popcorn-conf = { path = "../popcorn-conf" }
|
||||
clap = { version = "4.5.53", features = ["derive"] }
|
||||
serde = { version = "1.0.228", features = ["derive"] }
|
||||
|
||||
[build-dependencies]
|
||||
slint-build = "1.14.1"
|
||||
@ -1,3 +1,3 @@
|
||||
fn main() {
|
||||
slint_build::compile("ui/osd-popup.slint").unwrap();
|
||||
}
|
||||
}
|
||||
3
crates/popcorn/src/main.rs
Normal file
3
crates/popcorn/src/main.rs
Normal file
@ -0,0 +1,3 @@
|
||||
fn main() {
|
||||
println!("Hello, world!");
|
||||
}
|
||||
@ -33,7 +33,7 @@ export component OSDpopup inherits Window {
|
||||
background: osd_bg_color;
|
||||
}
|
||||
|
||||
//
|
||||
// Filled color
|
||||
osd_fill:= Rectangle {
|
||||
height: 100%;
|
||||
width: (popup_width/100) * percent_value *1px;
|
||||
Loading…
x
Reference in New Issue
Block a user