[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-108633":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":10,"pushedAt":35,"updatedAt":36,"readmeContent":37,"aiSummary":38,"trendingCount":15,"starSnapshotCount":15,"syncStatus":16,"lastSyncTime":39,"discoverSource":40},108633,"lidtap","yemcube\u002Flidtap","yemcube","Tap your MacBook lid: turn the display's edges into buttons using the built-in motion sensor. No extra hardware. macOS menu bar app.","yemcube.tech\u002Flidtap",null,"Swift",234,21,1,0,2,15,95,7,65.03,"Other",false,"main",true,[26,27,28,29,30,31,32,33,34],"accelerometer","apple-silicon","gestures","gyroscope","macbook","macos","menu-bar-app","privacy","swiftui","2026-11-05 09:44:02","2026-11-23 15:36:15","# LidTap\n\n**Tap your MacBook lid.** LidTap turns the edges of your MacBook's display into buttons, with no extra\nhardware. Tap a corner of the screen and it switches desktops, plays your music or hides everything\nin a meeting.\n\nIt works by listening to the motion sensor inside your MacBook. A tap on the lid twists the laptop\nslightly about its hinge; the sensor feels that twist about 800 times a second, and a small model\ntrained on *your* taps works out which part of the screen you tapped. Everything runs on your Mac:\nno account, and your taps and settings never leave the machine. The only time LidTap goes online is to ask\nGitHub whether a newer version is out (you can turn that off).\n\nMade by [Yemcube (@yem.cube)](https:\u002F\u002Fwww.instagram.com\u002Fyem.cube).\n\n- [What a tap can do](#what-a-tap-can-do)\n- [Profiles: desk, lap, sofa](#profiles-desk-lap-sofa)\n- [Install](#install)\n- [Getting good taps](#getting-good-taps)\n- [Which Macs work](#which-macs-work)\n- [License](#license)\n- [For developers](#for-developers)\n\n## What a tap can do\n\nLidTap splits the display into zones: 2×2 by default, or 2×3 and 3×3. Each zone does one thing, and\nyou choose which.\n\n| Action | What it does |\n|---|---|\n| **Desktop Left \u002F Right** | Switch to the previous or next desktop (Space) |\n| **Play \u002F Pause, Next, Previous** | Control whatever is playing: Music, Spotify, YouTube |\n| **Volume Up \u002F Down, Mute Sound** | Change the volume one step, or mute it, just like the volume keys |\n| **New Note** | Open a fresh note in Notes |\n| **Open App** | Launch an app, or bring it to the front if it's already open |\n| **Run Shortcut** | Run any of your Shortcuts: turn on a Focus, start a timer, message someone, anything Shortcuts can do |\n| **Privacy Guard** | Mid-meeting and someone walks in? One tap mutes every microphone, turns your meeting camera off (Zoom, Teams, Webex, Google Meet) and hides the screen. Tap again or click to come back, with your mic restored exactly as it was |\n\nThe default 2×2 layout: top-left **Desktop Left**, top-right **Desktop Right**, bottom-left\n**Play \u002F Pause**, bottom-right **Privacy Guard**.\n\nLidTap ignores the bumps that aren't taps: typing, clicking, scrolling, moving the pointer, moving the\nlid, and knocks on the desk.\n\n## Profiles: desk, lap, sofa\n\nA tap feels different on a desk, on your lap and on a sofa. Profiles let each place have its own\ncalibration, zone actions and sensitivity: say Desk switches desktops, and Sofa plays and pauses music.\n\nLidTap starts with no profiles. To add one, open Settings → Profiles and click **Add Profile…**. Name it,\npick an icon, and either calibrate on the new surface (recommended, about two minutes) or start with a copy\nof your current calibration. What you set up before is kept as **Default**, and you can rename it.\n\nOnce you have two or more, switch between them at the top of the LidTap menu, or press ⌘1 to ⌘9 while\nthe menu is open. Privacy Guard, feedback, sounds and update settings are shared by all profiles.\n\n## Install\n\n1. Download **LidTap-macOS.zip** from the [latest release](https:\u002F\u002Fgithub.com\u002Fharsha20599\u002Flidtap\u002Freleases\u002Flatest).\n2. Unzip it, drag **LidTap.app** to Applications and open it. It's signed and notarized by Apple, so it\n   opens like any other app.\n3. A hand icon appears in the menu bar, and Settings opens.\n4. Allow **Accessibility** when asked (System Settings → Privacy & Security → Accessibility). Desktop\n   switching and music keys need it. **Input Monitoring** is optional: it lets LidTap tell typing from\n   tapping more precisely.\n5. Click **Calibrate**. Tap the dot in each highlighted zone a few times (about two minutes), then let it\n   record 20 seconds of everyday bumps: typing, clicking, nudging the laptop. That's it.\n\n**Updating:** from 1.0.2 on, LidTap updates itself. About once a day it checks GitHub for a new release and\nasks before installing it; or click **Check Now** in Settings → General. It installs an update only if it's\nsigned by LidTap's developer, and keeps your calibration and settings. Turn off the daily check in Settings →\nGeneral. On 1.0.1 or earlier, download the new version once and replace the app in Applications. Coming from\n1.0 or an unsigned build? Switch LidTap off and on again in the Accessibility list, once.\n\n## Getting good taps\n\n- **A quick, light flick** with a fingertip on the dot near each zone's corner. Never press hard: you\n  don't need force, and pressing on a display can leave marks.\n- **Wait for the screen to settle** between taps (about half a second).\n- During calibration the meter says **Good tap**, **A little crisper** or **Gentler is fine**. Aim for green.\n- Too many misreads? Settings → Training shows how reliable each zone is; **Calibrate Again** adds taps\n  where they're needed.\n- **Taps refused as \"Too soft\"?** A screen tap moves a larger, heavier MacBook less (a 16\" MacBook Pro\n  twists a half to a third as much as a 13\" MacBook Air), so LidTap learns how hard taps land on *your* Mac\n  from your calibration taps. To set the limit by hand, turn off **Learn tap strength from my taps** in\n  Settings → Detection.\n\nWith crisp taps on a 2×2 grid, LidTap read 95% of taps correctly in our testing. Taps it isn't sure\nabout are ignored rather than guessed.\n\n## Which Macs work\n\n- An Apple Silicon MacBook **with the motion sensor**: MacBook Air or Pro with M2 or later, or the\n  14\"\u002F16\" MacBook Pro with M1 Pro or M1 Max.\n- **Not** the M1 MacBook Air, the 13\" M1 MacBook Pro, desktop Macs or Intel Macs: they have no motion sensor.\n- macOS 14 Sonoma or later.\n\nLidTap reads a sensor Apple doesn't document, so a future macOS update could change or break it.\n\n## License\n\nFree to use, change, tinker with and share under the [LidTap License](LICENSE): MIT, plus two rules.\n\n1. **If you share anything built on LidTap publicly** (an app, a fork, a video or post showing your\n   work), **credit \"Based on LidTap by Yemcube\"** with a link to Instagram\n   [@yem.cube](https:\u002F\u002Fwww.instagram.com\u002Fyem.cube). Private use needs no credit.\n2. **Commercial use needs approval first.** Selling it, putting it in a paid product or service, or\n   using it in a company's products or advertising: message [@yem.cube](https:\u002F\u002Fwww.instagram.com\u002Fyem.cube)\n   on Instagram.\n\nLidTap is not affiliated with or endorsed by Apple.\n\n---\n\n# For developers\n\n| Folder | What's in it |\n|---|---|\n| [`LidTapApp\u002F`](LidTapApp) | The macOS menu bar app (Swift, SwiftUI) and its tests. Start with its [README](LidTapApp\u002FREADME.md) |\n| [`lidtap\u002F`](lidtap), [`PROTOTYPE.md`](PROTOTYPE.md) | The original Python prototype: a browser GUI with live sensor traces, calibration and model comparison |\n| [`LidTap.md`](LidTap.md) | How the detection and recognition work, end to end |\n| [`reports\u002F`](reports), [`research_notes\u002F`](research_notes) | The research behind the approach: sensor access, prior art, signal processing and ML |\n| [`tools\u002Fimu_probe.py`](tools\u002Fimu_probe.py) | A minimal probe that reads the motion and lid-angle sensors |\n\n**Build the app** (needs the Xcode Command Line Tools):\n\n```bash\nLidTapApp\u002Fscripts\u002Fbuild.sh\n```\n\nIt compiles with `swiftc`, assembles `LidTapApp\u002Fbuild\u002FLidTap.app`, signs it ad hoc with the Hardened Runtime and\ninstalls it to `~\u002FApplications`. `--no-install` skips the install.\n\n**Make a release** signed with a Developer ID and notarized by Apple (the setup steps are at the top of the script):\n\n```bash\nLidTapApp\u002Fscripts\u002Frelease.sh\n```\n\nBump `CFBundleShortVersionString` in `LidTapApp\u002FResources\u002FInfo.plist` first, then publish a GitHub release tagged\n`v\u003Cversion>` with `LidTap-macOS.zip` attached. Installed copies find it through GitHub's latest-release API\n(drafts and pre-releases are ignored), show its notes, and install it only if it's newer and signed with the\nsame Developer ID (Team `23R7L2SQ34`).\n\n**Run the tests:**\n\n```bash\nLidTapApp\u002Fscripts\u002Ftest.sh\n```\n\nThat runs the ML, detector, app-logic and UI suites with no side effects. The Python prototype has its own\nhardware-free tests: `python -m unittest tests.test_prototype` from the repo root. `hardware`, `actions`,\n`guard` and `e2e` suites drive the real system (switch Spaces, mute the mic, open apps), so run\nthem only when you aren't using the Mac.\n\n**How it works, briefly:** the app reads the accelerometer and gyroscope through IOKit HID\n(`AppleSPUHIDDevice`, ~800 Hz), high-pass filters the gyro, and triggers on an adaptive threshold.\nEach tap becomes a 200 ms window and 70 features (shape, timing, axis ratios and a resampled template),\nclassified by a k-nearest-neighbours, logistic-regression or nearest-centroid model, whichever\ncross-validates best on your own data. Taps far from anything it has learned, or below its confidence\nfloor, are rejected. Credit for the sensor work goes to [yamete](https:\u002F\u002Fgithub.com\u002Fchipcolate\u002Fyamete),\n[apple-silicon-accelerometer](https:\u002F\u002Fgithub.com\u002Folvvier\u002Fapple-silicon-accelerometer) and\n[LidAngleSensor](https:\u002F\u002Fgithub.com\u002Fsamhenrigold\u002FLidAngleSensor); see `reports\u002F` for the full list.\n","LidTap 是一款 macOS 菜单栏应用，利用 MacBook 内置加速度计与陀螺仪感知屏幕边缘轻敲动作，将显示区域划分为可自定义功能的触控区。核心功能包括桌面切换、媒体控制、音量调节、快捷启动应用\u002F快捷指令、隐私保护（一键静音\u002F关摄像头\u002F隐藏屏幕）等，所有处理本地完成，无数据上传。支持多场景配置文件（如桌面、膝上、沙发），自动适配不同支撑面下的敲击特征。适用于追求高效免手操作、注重隐私的 MacBook 日常办公、会议及多媒体使用场景。","2026-11-24 04:34:50","CREATED_QUERY"]