https://github.com/emnudge/sync-primitives
https://github.com/emnudge/sync-primitives
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/emnudge/sync-primitives
- Owner: EmNudge
- Created: 2025-03-16T15:27:54.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-16T15:31:04.000Z (over 1 year ago)
- Last Synced: 2025-04-04T19:12:54.075Z (about 1 year ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Sync primitives
Idea: what if communication exclusively happens through a sync platform?
## Usage
- sync ~/foo between devices
### Confirmation strategy
- on one of these devices
- `watchexec -w ~/foo "inc-confirm foo_proj"`
- `watchexec -w ./action-list.md "exec-if-checked foo_proj "`
This will increment a line in `actions-list.md` of the form `- [ ] foo_proj (<number>)`.
When it is modified, the 2nd watch runs to see if it is checked.
## Debounce strategy
- on one of these devices
- `watchexec -w ~/foo "run-debounce foo_proj 30 <SCRIPT>"`
It will run the script in 30s after `~/foo` changes unless it another change happens before then. In which case it is 30s from that next invocation.