[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-111169":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":12,"openIssues":13,"contributorsCount":13,"subscribersCount":13,"size":13,"stars1d":13,"stars7d":12,"stars30d":11,"stars90d":13,"forks30d":13,"starsTrendScore":12,"compositeScore":14,"rankGlobal":8,"rankLanguage":8,"license":15,"archived":16,"fork":16,"defaultBranch":17,"hasWiki":16,"hasPages":16,"topics":18,"createdAt":8,"pushedAt":19,"updatedAt":20,"readmeContent":21,"aiSummary":22,"trendingCount":13,"starSnapshotCount":13,"syncStatus":23,"lastSyncTime":24,"discoverSource":25},111169,"edge-starter","joshsorenson\u002Fedge-starter","joshsorenson",null,"Rust",59,6,1,0,40.64,"MIT License",false,"main",[],"2026-11-06 18:52:14","2026-11-20 19:23:18","# Edge Starter\n\nA starting point for building your own app on the **Corsair XENEON Edge** on macOS, with the touchscreen working properly.\n\n**Tested on macOS 27.2 (Apple silicon), with the Edge connected to the Mac over USB-C** (one cable carries both the display and touch).\n\nThis came out of [Edge Deck](https:\u002F\u002Fjoshsorenson.com\u002Fapps\u002Fedge-deck), the dashboard I built for my own Edge.\n\n## The problem this solves\n\nOn a Mac, the Edge's touch panel shows up as a regular USB touchscreen, and macOS maps every touch onto your **main** display. Tap the Edge and you click whatever is in the same spot on your other monitor.\n\nThis starter takes over the Edge's touch panel while it's running, reads the touches itself, and delivers them straight into its own window. Taps, drags and text fields work on the Edge, and your mouse never moves.\n\n## What you get\n\n- **Touch on the Edge.** Taps become normal clicks, drags scroll, tapping a text field focuses it so you can type. Raw touches are available too.\n- **Covers the Edge edge to edge**, even with a Retina main display at 2x and the Edge at 1x (window placement with physical pixels gets this wrong). It pins a borderless window over the Edge, above its menu bar, instead of using macOS native fullscreen, which a menu bar app can't hold reliably.\n- **Stays there.** If the window gets moved off the Edge, or you unplug and replug it, it moves back. Touch also picks back up after a replug, and works even if you plug the Edge in after starting the app.\n- **Lives in the menu bar.** No Dock icon. It waits for the Edge, opens fullscreen on it when you plug it in, and hides when you unplug. The menu has a status line, Show on Edge, Open at login and Quit. Open at login turns on the first time it runs (set `OPEN_AT_LOGIN_BY_DEFAULT` in `src-tauri\u002Fsrc\u002Ftray.rs` to change that).\n- **A demo page** in `ui\u002F` (buttons, a text field, a scrolling list, a live touch readout) to replace with your own UI.\n- **Examples** you can keep or delete: now playing with a Spotify like button, weather, Apple Reminders, Apple Photos and system stats (see Examples below).\n- **A log** at `~\u002FLibrary\u002FLogs\u002Fedge-starter.log` that says exactly what happened with touch.\n\nBuilt with [Tauri 2](https:\u002F\u002Ftauri.app) (Rust) and a plain HTML\u002FCSS\u002FJS page. No web framework required, but you can drop one in.\n\n## Quick start\n\nYou need Rust, Node.js, and the Xcode Command Line Tools.\n\n```bash\nnpm install\n```\n\n**1. Sign it with your own certificate.** macOS ties the Input Monitoring permission to the app's signature. Unsigned (ad-hoc) builds get a new signature every build, so you'd have to re-allow touch after every rebuild. Find your identity:\n\n```bash\nsecurity find-identity -v -p codesigning\n```\n\nThen build with it (a free \"Apple Development\" certificate from Xcode works):\n\n```bash\nAPPLE_SIGNING_IDENTITY=\"Apple Development: Your Name (XXXXXXXXXX)\" npm run build\n```\n\nOr set `bundle.macOS.signingIdentity` in `src-tauri\u002Ftauri.conf.json` so you don't have to pass it each time.\n\n**2. Run it.** The app is in `src-tauri\u002Ftarget\u002Frelease\u002Fbundle\u002Fmacos\u002FEdge Starter.app`. Drag it to Applications and open it. Look for its icon in the menu bar; there's no Dock icon.\n\n**3. Allow Input Monitoring.** macOS asks the first time. If it doesn't, go to System Settings > Privacy & Security > Input Monitoring and turn on Edge Starter. Touch turns on within a few seconds, no restart needed.\n\nBefore you ship your own app, change `identifier` in `src-tauri\u002Ftauri.conf.json` from `com.example.edgestarter` to your own.\n\n## Building your app\n\nYour UI lives in `ui\u002F`. It's an ordinary web page:\n\n- Touches arrive as normal `click` events, so regular buttons and links work.\n- For raw touches, listen for `edgetouch` on `window`:\n\n  ```js\n  window.addEventListener(\"edgetouch\", (e) => {\n    const { kind, x, y } = e.detail; \u002F\u002F kind: \"down\" | \"move\" | \"up\"\n  });\n  ```\n\n- While a finger is down, the pressed element gets the `edge-pressed` class for feedback.\n- Call Rust from the page with `window.__TAURI__.core.invoke(\"command_name\")`. Add commands in `src-tauri\u002Fsrc\u002Flib.rs`.\n\nTips for the Edge's 2560 x 720 screen: keep touch targets at least 44 px, skip hover-only controls (fingers can't hover), and test at exactly 2560 x 720.\n\n## Examples\n\nOpen **ui\u002Fexamples.html** (there's a link on the demo page) for five working examples, each a card in `ui\u002Fexamples\u002F` and a Rust module in `src-tauri\u002Fsrc\u002Fexamples\u002F`. Keep the ones you want, delete the rest (see the top of `src-tauri\u002Fsrc\u002Fexamples\u002Fmod.rs`).\n\n| Example | What it shows | Setup |\n| --- | --- | --- |\n| Now playing | Spotify or Apple Music: track, artwork, play\u002Fpause, next, previous. Spotify songs get a like button. | macOS asks once per player (Automation). For the like button, see Spotify below. |\n| Weather | Now, feels like, high and low, the next hours. From [Open-Meteo](https:\u002F\u002Fopen-meteo.com) (free, no key). | Set `LAT` \u002F `LON` in `src-tauri\u002Fsrc\u002Fexamples\u002Fweather.rs`. |\n| Reminders | Open reminders from every list, check off, add to your default list (EventKit). | Tap \"Show my Reminders\"; macOS asks once. |\n| Photos | A random Favorite from Apple Photos every 30 seconds with a fade. Tap for the date and a heart to (un)favorite it (PhotoKit). Photos never opens. | Tap \"Show my photos\"; macOS asks once. |\n| This Mac | CPU, memory and network, sampled every 2 seconds. | None. |\n\nThe permission prompts need matching keys in `src-tauri\u002FInfo.plist` and `src-tauri\u002FEntitlements.plist` (hardened runtime). Remove the keys for examples you delete.\n\n**Spotify likes.** Spotify's Mac app can't like songs from AppleScript, so this uses the Spotify Web API with PKCE sign-in (no client secret).\n\n1. Create an app at [developer.spotify.com\u002Fdashboard](https:\u002F\u002Fdeveloper.spotify.com\u002Fdashboard) with the Web API.\n2. Add the redirect URI `http:\u002F\u002F127.0.0.1:4848\u002Fcallback`.\n3. Build with its Client ID: `SPOTIFY_CLIENT_ID=your-client-id npm run build`.\n4. Tap \"Connect Spotify\" on the card and sign in. The app listens on port 4848 only while a sign-in is in progress. Your sign-in is saved in `~\u002FLibrary\u002FApplication Support\u002Fedge-starter\u002Fspotify-token`, readable only by you.\n\n## How the touch takeover works (and what bit us)\n\nAll of it is in `src-tauri\u002Fsrc\u002Ftouch.rs`.\n\n- **The touch panel is three devices, not one.** It shows up as a touch digitizer, a mouse-emulation interface, and a vendor interface (USB `0x27c0:0x0859`). The mouse-emulation one is what moves your main pointer, so the app opens each interface separately with exclusive (\"seize\") access and logs the result for each.\n- **Only the mouse-emulation interface needs Input Monitoring.** The other two can be seized without it, which makes it look like touch \"half works\" when the permission is missing.\n- **macOS's permission check can say \"denied\" when access is granted.** `IOHIDCheckAccess` returned denied while the seize worked fine. So the app doesn't trust the check: it tries the seize and retries every 3 seconds until it works.\n- **Old permission records stick around.** If you allowed an earlier unsigned build, macOS keeps a record pinned to that exact build, and newer builds count as not allowed even though the switch looks on. Remove it and allow again:\n\n  ```bash\n  tccutil reset ListenEvent com.example.edgestarter\n  ```\n\n- **Touch only works while the app is running.** When it quits, the panel goes back to macOS, which sends touches to the main display again.\n\n## Troubleshooting\n\nCheck the log first:\n\n```bash\ntail -20 ~\u002FLibrary\u002FLogs\u002Fedge-starter.log\n```\n\n| Log says | What to do |\n| --- | --- |\n| `seize interface 0x1\u002F0x2 -> IOReturn 0xe00002e2` | Input Monitoring isn't in effect. Allow it (and reset the old record, above). |\n| `Edge touchscreen not found ... still looking` | The Edge isn't connected (or the USB-C cable only carries power). Touch turns on by itself once it's plugged in. |\n| `took over every Edge touch interface` | Touch is working. |\n| `Edge not connected; waiting in the menu bar` | The Edge isn't connected as a display. The window appears on its own once it is. |\n\n## License\n\nMIT. Build whatever you want on it.\n","Edge Starter 是一个为 Corsair XENEON Edge 触控显示器在 macOS 上提供原生触控支持的桌面应用启动模板。它通过 Tauri 2（Rust + Web 前端）接管 Edge 的 USB 触控输入，将触摸事件精准映射到 Edge 显示区域的独立无边框窗口，避免 macOS 默认将触控错误投射到主屏；支持点击、拖拽、文本输入及热插拔恢复，并以菜单栏应用形式常驻运行。适用于需要在 XENEON Edge 上构建专属触控仪表盘、控制面板或信息展示界面的 macOS 用户（Apple Silicon 环境已验证）。",2,"2026-11-24 04:40:19","CREATED_QUERY"]