# mu-waves

`mu-waves` is a lightweight, interactive desktop water ripple and wave simulation written in Vala using GTK3 and Cairo. It creates a borderless, transparent overlay bar (typically at the bottom of your screen) that refracts your underlying desktop background with fluid physics, ambient raindrops, mouse ripples, and specular water highlights.

## Features

* **Hugo Elias Wave Equation**: Fast, real-time 2D water ripple propagation algorithm.
* **Background Refraction**: Periodically captures the desktop background to produce realistic fluid distortion.
* **Interactive**: Click or drag your mouse across the bar to generate ripples.
* **Ambient Rain**: Configurable background raindrops that fall at random intervals.
* **Specular Highlights**: Shimmering light reflections on wave crests.
* **Multi-Monitor / Xinerama Support**: Target specific screens via command-line arguments or preferences.
* **Preferences & Persistence**: Configurable height, drop strength, rain frequency, and sway speed saved automatically to `~/.config/mu-waves/config.ini`.

## Dependencies

To build and run `mu-waves`, you need the following development packages:

* `valac` (Vala compiler)
* `libgtk-3-dev`
* `libcairo2-dev`

### Installing Dependencies (Ubuntu / Debian / Mint)

```bash
sudo apt update
sudo apt install valac libgtk-3-dev libcairo2-dev build-essential
```

## Compilation

You can compile the project using `valac` directly or via `make`:

```bash
valac --pkg gtk+-3.0 --pkg cairo mu-waves.vala -X -lm -o mu-waves
```

Or using a simple `Makefile`:

```makefile
all:
	valac --pkg gtk+-3.0 --pkg cairo mu-waves.vala -X -lm -o mu-waves

clean:
	rm -f mu-waves
```

## Usage

Run the binary normally (defaults to monitor index 0):

```bash
./mu-waves
```

### Running Multiple Instances on Different Monitors

You can pass a monitor index via command-line arguments to run multiple instances simultaneously on different screens (e.g., dual-monitor setups):

```bash
# Run on monitor 0
./mu-waves --monitor 0 &

# Run on monitor 1
./mu-waves -m 1 &
```

### Controls & Menu

* **Left Click / Drag**: Create manual water ripples.
* **Right Click**: Open the context menu to:
  * **Refresh Background**: Re-captures the desktop wallpaper behind the window.
  * **Preferences...**: Adjust impact strength, raindrop frequency, sway speed, window height, and target monitor index.
  * **Quit mu-waves**: Exit the application.