| 1 | ensure-config: |
| 2 | @if [ ! -f src/config.rs ]; then \ |
| 3 | echo "Creating config.rs from default_config.rs..."; \ |
| 4 | cp src/default_config.rs src/config.rs; \ |
| 5 | echo "✓ Edit src/config.rs to customize your setup"; \ |
| 6 | fi |
| 7 | |
| 8 | build: ensure-config |
| 9 | cargo build --release |
| 10 | |
| 11 | install: build |
| 12 | sudo cp target/release/oxwm /usr/local/bin/oxwm |
| 13 | @echo "✓ oxwm installed. Restart X or hit Mod+Shift+R (when implemented)" |
| 14 | |
| 15 | uninstall: |
| 16 | sudo rm -f /usr/local/bin/oxwm |
| 17 | |
| 18 | clean: |
| 19 | cargo clean |
| 20 | |
| 21 | test: ensure-config |
| 22 | pkill Xephyr || true |
| 23 | Xephyr -screen 1280x800 :1 & sleep 1 |
| 24 | DISPLAY=:1 cargo run |
| 25 | |
| 26 | reset-config: |
| 27 | cp src/default_config.rs src/config.rs |
| 28 | @echo "✓ Config reset to default" |