1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
# Phase 0 — Project Skeleton & Dev Environment
---
## Step 0.1 — Makefile and empty main
Create the basic project structure:
```
src/
main.c — int main() { return 0; }
bin/
build.sh — runs make
run.sh — builds then launches the binary
Makefile — compiles src/*.c → build/winman-raylib
```
**Makefile** compiles with `cc`, links nothing yet. Uses `pkg-config` for
flags. Output goes to `build/`.
**Verify:** `./bin/build.sh` succeeds, `./build/winman-raylib` runs and
exits silently with code 0.
---
## Step 0.2 — Install dependencies and verify Xephyr
Create `bin/setup-deps.sh` that installs all needed packages (Arch
`pacman` commands):
- **Build:** `base-devel`, `raylib`
- **X11 libs:** `libx11`, `libxcomposite`, `libxdamage`, `libxfixes`,
`libxrender`, `libxext`, `libxrandr`
- **GL:** `mesa`, `glew`
- **Dev tools:** `xorg-server-xephyr`, `xorg-xinit`, `xorg-xauth`
- **Test clients:** `xorg-xeyes`, `xorg-xclock`, `xterm`,
`xorg-xwininfo`, `xorg-xprop`, `xorg-xdpyinfo`
**Verify:** `./bin/setup-deps.sh` runs without errors. `Xephyr -help`
prints usage. `pkg-config --libs raylib x11 xcomposite xdamage xfixes`
prints flags.
---
## Step 0.3 — Xephyr launch/kill scripts
Create two scripts:
- `bin/xephyr-start.sh` — Launches Xephyr on `:1` with
`-br -ac -noreset -resizeable -no-host-grab -screen 1280x800`.
Prints the PID. Exits immediately (Xephyr runs in background).
- `bin/xephyr-stop.sh` — Kills the Xephyr process cleanly.
**Verify:** `./bin/xephyr-start.sh` opens a black Xephyr window.
`DISPLAY=:1 xeyes &` shows xeyes inside it. `./bin/xephyr-stop.sh`
closes everything.
---
## Step 0.4 — `bin/run.sh` — full dev loop script
A single script that:
1. Builds the project (`make`).
2. Starts Xephyr on `:1` if not already running.
3. Launches `build/winman-raylib` with `DISPLAY=:1`.
Accepts an optional `--clients` flag that also spawns `xeyes`, `xclock`,
and `xterm` into `:1` after a short delay.
**Verify:** `./bin/run.sh --clients` opens Xephyr, launches the (still
empty) binary, and spawns the test clients into the Xephyr window.
|