Skip to content

Latest commit

 

History

97 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dock

Rust CI

A lightweight, high-performance Wayland dock written in Rust

Dock Demo

Features

  • Auto-hide: Remains hidden until the cursor hovers near the screen edge, sliding smoothly into view.
  • Smart focus: Click an application icon to switch focus, bring its window to the foreground, or background.
  • Window list: Hover over an icon to see a list of open windows. Use the scroll wheel to cycle through them, or click the red box on a preview to close that window.
  • Drag&Drop: Drag files directly onto dock icons to pass context or launch them with specific applications.
  • Context Menu: Right-click an icon to access app-specific actions (e.g., "Open in Incognito Mode").
  • Pins: Pin or unpin applications, and drag-and-drop icons to reorder them anywhere on the dock.
  • Wayland Native: Built with Layer Shell and Foreign Toplevel protocols for smooth integration.
  • Fast & Transparent: Low resource consumption with seamless transparent animations.
  • RAM & CPU: ~35–40 MB RAM | Single-thread CPU: 0.6% idle, ~25% active average (60% peak).
  • Desktop & Steam Integration: Resolves application icons, .desktop files, and Steam game launcher shortcuts dynamically.
  • D-Bus Support: Integrates with system protocols for dynamic window management, drag-and-drop handling, and running status indicators.

Supported Compositors (Wayland)

dock works on any Wayland compositor supporting wlr-layer-shell-unstable-v1 and wlr-foreign-toplevel-management-unstable-v1:

  • labwc (Primary target / recommended)
  • Sway
  • Hyprland
  • Wayfire
  • river
  • COSMIC

Prerequisites & Dependencies

Rust Version

  • Cargo / Rustc: 1.75.0 or higher (Rust Edition 2021 recommended)

System Dependencies

Ensure the following build tools and development libraries are installed on your system:

  • Build Tools: make, gcc, pkg-config
  • Wayland Libraries: wayland-client, wayland-protocols
  • Input & Graphics: libxkbcommon, pixman, cairo, glib2, mesa (EGL/GLES)
  • System Services: dbus

Installing Dependencies on Arch Linux:

sudo pacman -S --needed base-devel cargo wayland wayland-protocols libxkbcommon fontconfig dbus cairo glib2 mesa

Installing Dependencies on Ubuntu / Debian:

sudo apt update
sudo apt install -y build-essential cargo pkg-config libwayland-dev wayland-protocols libxkbcommon-dev libfontconfig1-dev libdbus-1-dev libglib2.0-dev libcairo2-dev libegl1-mesa-dev libgles2-mesa-dev

Installation

Pre-compiled Binary

Download and extract the latest release archive:

tar -xzf dock-linux-amd64.tar.gz
cd dock-linux-amd64
make install

Or download via terminal:

curl -sSL https://github.com/resdon/dock/releases/latest/download/dock-linux-amd64.tar.gz | tar -xz
cd dock-linux-amd64
make install

Building From Source

1. Clone the Repository

git clone https://github.com/resdon/dock.git
cd dock

2. Build and Install

Compile the binary in release mode and install it to system PATH (/usr/local/bin):

make install

Alternatively, build manually via Cargo:

cargo build --release

3. Launching the Dock

Run in Background (CLI):

nohup dock &

Autostarting on labwc:

Add the following line to ~/.config/labwc/autostart:

dock &

Autostarting on Sway / Hyprland:

  • Sway (~/.config/sway/config):
    exec dock
  • Hyprland (~/.config/hypr/hyprland.conf):
    exec-once = dock

Repository Structure

dock/
├── assets/          # Bundled fonts and connection indicator icons
├── scripts/         # Launcher and icon listing scripts
├── src/             # Core Rust source files
│   ├── app/         # Main event loop and draw calls
│   ├── cache/       # Icon indexing and state persistence
│   ├── geometry/    # Dock layout math and bounding boxes
│   ├── graphics/    # Animation, fade, and visual effects
│   ├── handlers/    # Window list and context menu event handlers
│   ├── interaction/ # Proximity, motion, and hover routines
│   ├── pointer/     # Click, drag, and scroll input handling
│   ├── render/      # Framebuffer drawing and font rendering
│   ├── resolvers/   # Desktop file parser and Steam app resolver
│   └── services/    # Display & monitor detection services
├── Cargo.toml       # Cargo package manifest
├── Makefile         # Build & installation targets
└── PKGBUILD         # Arch Linux packaging file

License

Distributed under the MIT License.

Releases

Packages

Contributors

Languages