Init repo

This commit is contained in:
Candifloss 2026-01-01 22:30:35 +05:30
parent f910e3b605
commit 5a3f46d204
5 changed files with 41 additions and 0 deletions

7
.gitignore vendored
View File

@ -20,3 +20,10 @@ Cargo.lock
# and can be added to the global gitignore or merged into this file. For a more nuclear # and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder. # option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/ #.idea/
# Added by me
/test
# Added by cargo
/target

12
Cargo.toml Normal file
View File

@ -0,0 +1,12 @@
[package]
name = "power-menu"
version = "0.1.0"
edition = "2024"
build = "build.rs"
[dependencies]
i-slint-backend-winit = { version = "1.14.1", default-features = false, features = ["x11"] }
slint = { version = "1.14.1", default-features = false, features = ["backend-winit", "compat-1-2", "renderer-software"] }
[build-dependencies]
slint-build = "1.14.1"

3
build.rs Normal file
View File

@ -0,0 +1,3 @@
fn main() {
slint_build::compile("ui/power-menu.slint").unwrap();
}

15
src/main.rs Normal file
View File

@ -0,0 +1,15 @@
use i_slint_backend_winit::{
Backend,
winit::{
platform::x11::{WindowAttributesExtX11, WindowType},
window::WindowAttributes,
},
};
slint::include_modules!();
fn main() -> Result<(), Box<dyn std::error::Error>> {
let ui = PowerMenu::new()?;
ui.run();
Ok(())
}

4
ui/power-menu.slint Normal file
View File

@ -0,0 +1,4 @@
export component PowerMenu inherits Window {
background: #adadad57;
no-frame: true;
}