Begin restructuring

- Daemon `popcorn-d` handles the UI rendering
- `popcorn` acts as cli tool
This commit is contained in:
Candifloss 2025-12-21 22:47:43 +05:30
parent 0d7dfde926
commit 5207826108
8 changed files with 36 additions and 34 deletions

View File

@ -2,9 +2,25 @@
name = "popcorn-d"
version = "0.1.0"
edition = "2024"
description = "Popcorn OSD daemon to watch for system events."
description = "Popcorn OSD daemon (UI renderer)"
readme = "README.md"
repository = "https://git.candifloss.cc/candifloss/popcorn.git"
authors = ["Candifloss <candifloss.cc>"]
categories = ["Desktop", "GUI", "Daemon"]
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 = { version = "1.14.1", default-features = false, features = ["backend-winit", "renderer-software", "compat-1-2"]}
toml = "0.9.8"
popcorn-conf = { path = "../popcorn-conf" }
clap = { version = "4.5.53", features = ["derive"] }
serde = { version = "1.0.228", features = ["derive"] }
tokio = { version = "1.48.0", features = ["full"] }
[build-dependencies]
slint-build = "1.14.1"

View File

@ -1,3 +1,13 @@
fn main() {
println!("Hello, world!");
mod args;
mod show_popup;
use args::{CliArgs, OsdArgs};
use clap::Parser;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let cli = CliArgs::parse();
let parsed_args: OsdArgs = cli.into();
show_popup::show_popup(&parsed_args)?;
Ok(())
}

View File

@ -2,25 +2,11 @@
name = "popcorn"
version = "0.1.0"
edition = "2024"
description = "Cute and simple OSD popups on your desktop"
description = "CLI client for Popcorn OSD"
readme = "README.md"
repository = "https://git.candifloss.cc/candifloss/popcorn.git"
authors = ["Candifloss <candifloss.cc>"]
categories = ["Desktop", "GUI"]
categories = ["Desktop", "CLI"]
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 = { version = "1.14.1", default-features = false, features = ["backend-winit", "renderer-software", "compat-1-2"]}
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"
keywords = ["OSD", "popup", "desktop", "cli"]
license = "GPL-3+"

View File

@ -1,13 +1,3 @@
mod args;
mod show_popup;
use args::{CliArgs, OsdArgs};
use clap::Parser;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let cli = CliArgs::parse();
let parsed_args: OsdArgs = cli.into();
show_popup::show_popup(&parsed_args)?;
Ok(())
fn main() {
println!("Hello, world!");
}