# rox-tiler

A lightweight, smart window tiling controller written in **Vala** using GTK-3. It dynamically scans active window lists on the X11 server to automatically arrange instances of the **ROX-Filer** file manager beneath itself.

## Features

- **X11 Self-Exclusion:** Determines its own native XID dynamically to ensure the controller window doesn't get swept into its own layouts.
- **Precision Matching:** Restricts window hooks precisely to classes matching `rox` or `rox-filer` so names with substring matches (like `rox-tiler` itself) never conflict.
- **Adaptive Spawning & Layout:**
  - $\ge 2$ ROX windows found: Directs the most recent two into a side-by-side tile.
  - $1$ ROX window found: Launches a new instance and tiles them.
  - No ROX windows found: Spawns two new processes, tracks their PIDs, and tiles them cleanly once drawn.
- **Intelligent Spacing:** Adjusts horizontal layout using Gdk Monitor workareas, starting 36px below the controller window.
- **Dynamic Height Limits:** Targets $3/4$ of the screen height, dynamically scaling down if the controller window is placed lower down on the desktop so the file manager frames don't drop off the bottom of the screen.

---

## Dependencies

Before compiling, make sure you have the required Vala and GTK development headers installed:

```bash
# On Debian / Ubuntu / Linux Mint
sudo apt install valac libgtk-3-dev libx11-dev