From ce7e5a6f805dae529b91c0ea9e0720bd9ef6184d Mon Sep 17 00:00:00 2001 From: tittu Date: Sun, 14 Jun 2026 10:14:37 +0530 Subject: [PATCH] update readme --- README.md | 34 +++++++++++++++++++++++------- src/main.rs | 29 +++++++++++++++++++------ src/{wallbashed.rs => wallbash.rs} | 0 3 files changed, 48 insertions(+), 15 deletions(-) rename src/{wallbashed.rs => wallbash.rs} (100%) diff --git a/README.md b/README.md index d900ad6..cc634f1 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,10 @@ Use `wallbash` as a core component of your Wayland desktop environment — set w - Vulkan-powered GPU acceleration for smooth performance - Color palette generation for dynamic theming (WIP) -- Support for smooth transitions and animations (WIP) +- Fluid transitions and animations (WIP) - Multi-monitor support (WIP) +- Scale and anchor the image to your liking +- Dynamic blur fill for mismatched aspect ratios to eliminate black bars ## Build @@ -28,10 +30,25 @@ sudo cp target/release/wallbash /usr/local/bin/ ## Usage ```bash -wallbash start # Start the daemon -wallbash set /path/to/file.img # Set wallpaper (auto start daemon) -wallbash stop # Stop the daemon -wallbash status # Show daemon status +wallbash start # Start the wallpaper daemon +wallbash set /path/to/file.img # Set wallpaper (auto start daemon) +wallbash stop # Stop the daemon +wallbash status # Show daemon status + + ┌─────────────────────────────────────────┐ + │ ┌─────────────────────────────────────┐ │ + │ │ (1) (2) (3) │ │ + │ │ │ │ + │ │ (4) (5) (6) │ │ + │ │ │ │ + │ │ (7) (8) (9) │ │ + │ └─────────────────────────────────────┘ │ + └─────────────────────────────────────────┘ + +wallbash set [option] + -m, --mode # Scaling mode (cover, fit, original) + -a, --anchor <1-9> # Anchor point (1=top-left ... 9=bottom-right) + -w, --wall # Wallpaper file /path/to/file.img ``` The Rust binary compiles to a single executable, `wallbash`. It acts as both a client and a daemon: @@ -46,15 +63,16 @@ The Rust binary compiles to a single executable, `wallbash`. It acts as both a c ``` src/ ├── main.rs -├── wallbashed.rs +├── wallbash.rs ├── wayland.rs └── vulkan.rs ``` -The project is structured in simple modules: +The core project is structured in simple modules: - `main.rs` Entry point of the binary. Works as a CLI tool to parse arguments and handle the daemon. -- `wallbashed.rs` The core daemon module. It manages the IPC listener, handles incoming commands, and orchestrates the wallpaper loading and rendering process. +- `wallbash.rs` The core daemon module. It manages the IPC listener, handles incoming commands, and orchestrates the wallpaper loading and rendering process. - `wayland.rs` Handles the Wayland integration. It creates a Wayland surface, binds to the layer shell protocol, and sets up the layer surface for the wallpaper. - `vulkan.rs` Manages the Vulkan rendering pipeline. It initializes the Vulkan instance, selects a physical device (preferring a discrete GPU), creates a swapchain, and renders the wallpaper image. +###### *
// HyDE
*

diff --git a/src/main.rs b/src/main.rs index d6617d9..37c3c18 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,7 +6,7 @@ // --------------------------------------------------------------------- / imports -pub mod wallbashed; +pub mod wallbash; pub mod wayland; pub mod vulkan; use std::{ @@ -23,11 +23,26 @@ const LOG_FILE: &str = "/tmp/wallbash.log"; // --------------------------------------------------------------------- / funtions fn print_usage() { - eprintln!("[Usage]"); - eprintln!(" wallbash start | Start the wallpaper daemon"); - eprintln!(" wallbash set /path/to/file.img | Set the wallpaper"); - eprintln!(" wallbash stop | Stop the daemon"); - eprintln!(" wallbash status | Show daemon status"); + eprintln!(r"[Usage] + wallbash start | Start the wallpaper daemon + wallbash set /path/to/file.img | Set wallpaper (auto start daemon) + wallbash stop | Stop the daemon + wallbash status | Show daemon status + + ┌─────────────────────────────────────────┐ + │ ┌─────────────────────────────────────┐ │ + │ │ (1) (2) (3) │ │ + │ │ │ │ + │ │ (4) (5) (6) │ │ + │ │ │ │ + │ │ (7) (8) (9) │ │ + │ └─────────────────────────────────────┘ │ + └─────────────────────────────────────────┘ + + wallbash set [option] + -m, --mode | Scaling mode (cover, fit, original) + -a, --anchor <1-9> | Anchor point (1=top-left ... 9=bottom-right) + -w, --wall | Wallpaper file /path/to/file.img"); } fn send_command(cmd: &str) -> Result<(), Box> { @@ -104,7 +119,7 @@ fn main() { eprintln!("Daemon is already running."); return; } - if let Err(e) = wallbashed::run(SOCKET_PATH) { + if let Err(e) = wallbash::run(SOCKET_PATH) { eprintln!("Failed to start daemon {}", e); } } diff --git a/src/wallbashed.rs b/src/wallbash.rs similarity index 100% rename from src/wallbashed.rs rename to src/wallbash.rs