oxwm

https://git.tonybtw.com/oxwm.git git://git.tonybtw.com/oxwm.git

Updated justfile and config.rs -> default_config.rs

Commit
98a19946a3668c7ee1179fdb4b3ec882fd86a222
Parent
5135de0
Author
tonybtw <tonybtw@tonybtw.com>
Date
2025-10-09 05:28:03

Diff

diff --git a/.gitignore b/.gitignore
index e0561ca..94958ae 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,6 @@ target/
 # Nix
 result
 
+# User config
+src/config.rs
+
diff --git a/justfile b/justfile
index 2cc6018..77f67f8 100644
--- a/justfile
+++ b/justfile
@@ -1,4 +1,11 @@
-build:
+ensure-config:
+    @if [ ! -f src/config.rs ]; then \
+        echo "Creating config.rs from default_config.rs..."; \
+        cp src/default_config.rs src/config.rs; \
+        echo "✓ Edit src/config.rs to customize your setup"; \
+    fi
+
+build: ensure-config
     cargo build --release
 
 install: build
@@ -11,7 +18,11 @@ uninstall:
 clean:
     cargo clean
 
-test:
+test: ensure-config
     pkill Xephyr || true
     Xephyr -screen 1280x800 :1 & sleep 1
     DISPLAY=:1 cargo run
+
+reset-config:
+    cp src/default_config.rs src/config.rs
+    @echo "✓ Config reset to default"
diff --git a/src/config.rs b/src/default_config.rs
similarity index 100%
rename from src/config.rs
rename to src/default_config.rs