tony / oxwm

Fixed justfile to point to .local/bin Browse files
tonybtw committed 2025-10-10 parent 0fc3d43 commit 4e7d825aecf802a2e58b691dba82ebb6d001cb67
Showing 3 changed files with 13 additions and 5 deletions. UnifiedSplit
+4 −4 justfile
@@ -2,12 +2,13 @@ build:
2 2 cargo build --release
3 3
4 4 install: build
5 - sudo cp target/release/oxwm /usr/local/bin/oxwm
6 - @echo "✓ oxwm installed to /usr/local/bin/oxwm"
5 + cp target/release/oxwm ~/.local/bin/oxwm
6 + chmod +x ~/.local/bin/oxwm
7 + @echo "✓ oxwm installed to ~/.local/bin/oxwm"
7 8 @echo " Run 'oxwm --init' to set up your config"
8 9
9 10 uninstall:
10 - sudo rm -f /usr/local/bin/oxwm
11 + rm -f ~/.local/bin/oxwm
11 12 @echo "✓ oxwm uninstalled"
12 13 @echo " Your config at ~/.config/oxwm is preserved"
13 14
@@ -38,4 +39,3 @@ fmt:
38 39
39 40 pre-commit: fmt check build
40 41 @echo "✓ All checks passed!"
41 -
+8 −0 src/window_manager.rs
@@ -351,10 +351,18 @@ impl WindowManager {
351 351
352 352 let source = config_dir.join("target/release/oxwm-user");
353 353 let dest = get_cache_binary_path();
354 + let backup = dest.with_extension("old");
354 355
355 356 std::fs::create_dir_all(dest.parent().unwrap())?;
357 +
358 + if dest.exists() {
359 + std::fs::rename(&dest, &backup)?;
360 + }
361 +
356 362 std::fs::copy(&source, &dest)?;
357 363
364 + let _ = std::fs::remove_file(&backup);
365 +
358 366 notify("OXWM", "Recompiled successfully! Restarting...");
359 367
360 368 Ok(())
+1 −1 templates/config.rs
@@ -164,7 +164,7 @@ pub const STATUS_BLOCKS: &[BlockConfig] = &[
164 164 underline: false,
165 165 },
166 166 BlockConfig {
167 - format: " {}",
167 + format: " {}",
168 168 command: BlockCommand::Shell("uname -r"),
169 169 interval_secs: u64::MAX,
170 170 color: RED,