YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
fix(dev-vm): crisp 1:1 display — px-sized virtual display, refit off
Louis Beaumontab5fc40efd11
diff --git a/scripts/dev-vm/README.md b/scripts/dev-vm/README.mdindex 4eaeb820e..fd0999338 100644--- a/scripts/dev-vm/README.md+++ b/scripts/dev-vm/README.md@@ -10,7 +10,7 @@ A scripted macOS VM (via [tart](https://tart.run), Apple Virtualization.framewor./scripts/dev-vm/ssh.sh # shell into it```-Defaults: `screenpipe-dev` VM, 8 CPU, 16GB RAM, 80GB sparse disk, macOS Tahoe base image, guest display 1920x1200 HiDPI (set via displayplacer; override with `GUEST_RES`), window opens maximized (`VM_WINDOW=keep` to skip) with `--display-refit` so resizing the window re-fits the guest. Other overrides: `VM_NAME`, `IMAGE`, `VM_CPU`, `VM_MEM`, `VM_DISK`, `VM_DISPLAY`.+Defaults: `screenpipe-dev` VM, 8 CPU, 16GB RAM, 80GB sparse disk, macOS Tahoe base image. Display: `1920x1022px` virtual display (1:1 crisp in a maximized window on a 1080p host screen; set `VM_DISPLAY=2560x1440px` or similar on bigger/Retina monitors), window opens maximized (`VM_WINDOW=keep` to skip). Refit is off on purpose: `--display-refit` combined with a pinned in-guest mode makes the view render the raw framebuffer 2x-cropped. Other overrides: `VM_NAME`, `IMAGE`, `VM_CPU`, `VM_MEM`, `VM_DISK`, `GUEST_RES`.## What gets installed in the guestdiff --git a/scripts/dev-vm/provision.sh b/scripts/dev-vm/provision.shindex fb4c3bd32..5042f3698 100755--- a/scripts/dev-vm/provision.sh+++ b/scripts/dev-vm/provision.sh@@ -97,15 +97,15 @@ cat > "$HOME/Library/LaunchAgents/pe.screenpi.devvm.claude.plist" <<'PLIST'PLISTlaunchctl bootstrap "gui/$(id -u)" "$HOME/Library/LaunchAgents/pe.screenpi.devvm.claude.plist" 2>/dev/null || true-# guest display resolution (HiDPI). the tart-side --display/--display-refit config-# defines the virtual display; the guest still boots at a small scaled mode, so we-# pin a dense one here. override with GUEST_RES, e.g. GUEST_RES=2560x1600.-GUEST_RES="${GUEST_RES:-1920x1200}"-log "setting display to ${GUEST_RES} HiDPI..."-brew install --quiet displayplacer >/dev/null 2>&1 || true-SID=$(displayplacer list 2>/dev/null | awk '/Persistent screen id/{print $4}')-if [ -n "$SID" ]; then- displayplacer "id:${SID} res:${GUEST_RES} hz:60 color_depth:7 scaling:on origin:(0,0) degree:0" \+# guest display mode. With a px-sized virtual display (see setup.sh) the guest+# boots straight into the native 1:1 mode and nothing needs pinning. Set+# GUEST_RES (e.g. "1600x852") only to force a different mode from the list in+# `displayplacer list`.+if [ -n "${GUEST_RES:-}" ]; then+ log "pinning display mode ${GUEST_RES}..."+ brew install --quiet displayplacer >/dev/null 2>&1 || true+ SID=$(displayplacer list 2>/dev/null | awk '/Persistent screen id/{print $4}')+ [ -n "$SID" ] && displayplacer "id:${SID} res:${GUEST_RES} hz:60 color_depth:7 origin:(0,0) degree:0" \|| log "displayplacer could not set ${GUEST_RES}; keeping current mode"fidiff --git a/scripts/dev-vm/setup.sh b/scripts/dev-vm/setup.shindex 8f22cc747..04ba025df 100755--- a/scripts/dev-vm/setup.sh+++ b/scripts/dev-vm/setup.sh@@ -19,7 +19,11 @@ IMAGE="${IMAGE:-ghcr.io/cirruslabs/macos-tahoe-base:latest}"VM_CPU="${VM_CPU:-8}"VM_MEM="${VM_MEM:-16384}" # MBVM_DISK="${VM_DISK:-80}" # GB (sparse: only used space hits the host disk)-VM_DISPLAY="${VM_DISPLAY:-2560x1600}" # points (HiDPI); refit keeps it matched to the window+# px = guest renders 1:1 into the window (crisp on 1x monitors; default fits a+# maximized window on a 1080p screen). On a Retina host use e.g. 2560x1440px or+# a pt size. Do NOT combine display-refit with an in-guest pinned mode: the view+# stops scaling and shows the framebuffer 2x-cropped.+VM_DISPLAY="${VM_DISPLAY:-1920x1022px}"SSH_KEY="$HOME/.ssh/${VM_NAME}-vm"SSH_OPTS=(-i "$SSH_KEY" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR)SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"@@ -50,7 +54,7 @@ fiif ! tart list --quiet | grep -qx "$VM_NAME"; thenlog "cloning $IMAGE -> $VM_NAME"tart clone "$IMAGE" "$VM_NAME"- tart set "$VM_NAME" --cpu "$VM_CPU" --memory "$VM_MEM" --disk-size "$VM_DISK" --display "$VM_DISPLAY" --display-refit+ tart set "$VM_NAME" --cpu "$VM_CPU" --memory "$VM_MEM" --disk-size "$VM_DISK" --display "$VM_DISPLAY" --no-display-refitfi# 4. boot headless if not running (`tart ip` returns a stale lease when stopped; check the process)