2 releases
new 0.0.2 | May 21, 2025 |
---|---|
0.0.1 | May 21, 2025 |
#662 in Game dev
95 downloads per month
2.5MB
2K
SLoC
anny-dock
A modern, animated dock for Hyprland built with Rust and Bevy Engine. Currently exclusive to Hyprland, with plans to support other window managers in the future.
Note: This is my first Rust project! While I'm committed to writing clean and efficient code, I'm also learning along the way. Feedback and suggestions are greatly appreciated as I explore Rust's capabilities and best practices.
Features • Installation • Usage • Configuration • Contributing
Features
Smooth Animations
- 🎯 Intelligent hover effects with smooth transitions
- 🔄 Natural diagonal scrolling behavior (now with configurable inclination)
- ✨ Frame-rate independent animations
- 🎨 Subtle scale transformations
Smart Icon Management
- 📱 Dynamic icon loading and scaling
- 🔍 Automatic icon discovery from running applications
- 📌 Pinnable favorite applications
- 🎯 Precise icon positioning with smooth reordering
Hyprland Integration
- 🖥️ Seamless Hyprland window management
- 🚀 Native Hyprland client detection
- 🎨 Transparent background support
- 🔗 Direct window focusing and management
Modern Interface
- 🖼️ Transparent background support
- 🎨 High-quality SVG icon rendering
- 📐 Configurable dock size and position
- 🔲 Clean, minimal design
Performance
- ⚡ Hardware-accelerated rendering
- 🎮 Optimized animation system
- 🔄 Efficient state management
- 📊 Low resource usage
Requirements
- Hyprland
- Rust 1.75+
Installation
# Clone the repository
git clone https://github.com/horberlan/anny-dock.git
# Enter the directory
cd anny-dock
# Build the project
cargo build --release
# Run anny-dock
cargo run --release
Usage
Basic Controls
- Scroll: Navigate through icons
- Left Click: Launch/Focus application
- Right Click: Pin/Unpin application
- T: Toggle application titles
- Q/Esc: Close application
- 1..8: Launch/Focus visible applications
- Drag & Drop: Reorder icons
Configuration
anny-dock can be configured through the DockConfig
resource:
pub struct DockConfig {
pub margin_x: f32, // Horizontal margin from screen edge
pub margin_y: f32, // Vertical margin from screen edge
pub spacing: f32, // Space between icons
pub z_spacing: f32, // Depth spacing for 3D effect
pub base_scale: f32, // Base icon scale
pub scale_factor: f32, // Scale factor for animations
pub scroll_speed: f32, // Scroll sensitivity
pub visible_items: usize, // Number of visible icons
pub tilt_y: f32, // Inclination factor (0.0 = horizontal, 0.5 = strong diagonal)
}
Dock Inclination (tilt_y
)
- The
tilt_y
field controls the inclination of the dock towards the center of the screen. - Example:
tilt_y: 0.25
makes the dock point to a spot 25% of the screen height above the center. - Adjust this value to customize the dock's angle to your visual preference.
Architecture
anny-dock is built using a modern ECS architecture with Bevy:
Core Systems
- Animation System
- Hover System
- Scroll System (diagonal, inclination configurable)
- Icon Management
- Hyprland Integration
- Event Handling
Components
HoverTarget
: Manages hover states and animationsClientIcon
: Handles icon rendering and scalingScrollState
: Controls scroll behaviorDockConfig
: Manages dock configuration
Roadmap
Current
- Hyprland support
- Basic animation system
- Icon management
- Favorite applications
Planned
- Scroll using keyboard arrows
- Configuration file
- Migrate to hyprland layer
- Custom themes
- Multi-monitor support
- Support for other window managers
Development
Prerequisites
- Rust 1.75+
- Bevy dependencies
- Hyprland
Building from Source
# Debug build
cargo build
# Release build
cargo build --release
# Run tests
cargo test
Contributing
We welcome contributions! Please see our Contributing Guidelines for details.
As this is my first Rust project, I'm particularly open to:
- Code reviews and best practices suggestions
- Rust idioms and patterns recommendations
- Performance optimization tips
- Architecture improvement ideas
Development Process
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Bevy Engine for the UI
- Hyprland for the window manager integration
- bevy_svg for SVG rendering
- xdg-utils for desktop integration
Dependencies
~50–87MB
~1.5M SLoC