diff --git a/scripts/install.sh b/scripts/install.sh index a4eea54..47a51cd 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -4,7 +4,7 @@ # # Curl-pipe ready: # -# curl -fsSL https://gitea.cahlen.com/nokeo08/Move/raw/branch/master/install.sh | sh +# curl -fsSL https://gitea.cahlen.com/nokeo08/Move/raw/branch/master/scripts/install.sh | sh # # What it does: # 1. Detect platform; bail on anything @nut-tree-fork/nut-js doesn't ship. diff --git a/scripts/uninstall.sh b/scripts/uninstall.sh index c250c9b..2cbcaff 100755 --- a/scripts/uninstall.sh +++ b/scripts/uninstall.sh @@ -4,7 +4,7 @@ # # Curl-pipe ready: # -# curl -fsSL https://gitea.cahlen.com/nokeo08/Move/raw/branch/master/uninstall.sh | sh +# curl -fsSL https://gitea.cahlen.com/nokeo08/Move/raw/branch/master/scripts/uninstall.sh | sh # # Removes the `move` wrapper from $XDG_BIN_HOME and the install tree from # $XDG_DATA_HOME/move. Does NOT remove Bun — that's your runtime, not ours. diff --git a/src/config.ts b/src/config.ts index fe4d5c5..9951285 100644 --- a/src/config.ts +++ b/src/config.ts @@ -10,7 +10,7 @@ * `resolveConfig` rather than mutating the defaults, so the defaults stay * genuinely constant and the resolved config stays structurally typed. * - * All numeric `Config` fields are in their internal units (ms, pixels). + * All numeric `Config` fields are in their internal units (milliseconds). * The CLI and config file expose the time-valued fields in seconds for * ergonomics; `resolveConfig` performs the seconds->ms conversion at the * boundary so downstream code never has to think about it. diff --git a/src/move.ts b/src/move.ts index 55335bc..ba44615 100755 --- a/src/move.ts +++ b/src/move.ts @@ -4,23 +4,27 @@ * ------- * Entry point for the `move` CLI. * - * Thin shim that ties the four logic modules together: + * Thin shim that ties the logic modules together: * - `cli.ts` parses and validates `process.argv`. * - `configFile.ts` loads and validates the JSON config file. * - `config.ts` holds defaults and the layered `resolveConfig` overlay. - * - `keeper.ts` owns the synthetic-activity sweep and idle-watch loop. + * - `editor.ts` backs `--edit` (open the config file in `$EDITOR`). + * - `keeper.ts` owns the idle-watch loop and drives the movement + * machinery (device / strategy / executor). * * Order of operations: * 1. Parse CLI args. Bad input -> stderr + usage hint, exit 2. * 2. `--help` / `--version` short-circuit before any I/O, config load, or * mouse work. `keeper.ts` is also lazy-imported (see below) so these * flags don't pay the cost of loading the nut.js native binary. - * 3. Load + validate the config file (default XDG path, or `--config + * 3. `--edit` opens the resolved config file in `$EDITOR` and is a + * terminal action (propagates the editor's exit code). + * 4. Load + validate the config file (default XDG path, or `--config * ` if supplied). Validation failures share the exit-2 path. - * 4. Resolve the full `Config` (CLI > file > DEFAULT_CONFIG) — verbose + * 5. Resolve the full `Config` (CLI > file > DEFAULT_CONFIG) — verbose * lives inside `Config` and is layered with the same precedence as * the numeric fields. - * 5. Lazy-import `keeper.ts` (dynamic import keeps nut.js out of the + * 6. Lazy-import `keeper.ts` (dynamic import keeps nut.js out of the * `--help` / `--version` startup path) and run it. Any unhandled * rejection — from the import itself or from the loop — exits 1. *