Skip to content
Proyek

Tentang

Peluncur ⌘Space untuk Mac yang digambar dengan nanoui: aplikasi, perhitungan matematika, saran Google dengan hasil di panel, Grok, dan X

Proyek lainnya

Cara angka ini diukur

Pertumbuhan bintang terukur

dalam 24 jam
0
dalam 7 hari
0
dalam 15 hari
+1
dalam 1 bulan
Mengumpulkan riwayat

Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.

README.md

Asli

Nanolight's icon

Nanolight

A launcher for the Mac, Windows and Linux, drawn by nanoui.
Apps, math, Google, Grok, X and Raycast extensions: one keystroke away. Native Zig, no Electron, about 2 MB.

Introducing Nanolight 2.0, now on Mac, Windows and Linux, in 40 seconds: a MacBook Air and a Dell XPS 13 side by side, then Settings, a Raycast extension and a script command on a MacBook Air, then Windows and Linux on a Dell XPS 13
Watch it with sound → · How it was made

Nanolight's panel has found Safari from "saf"

What it does

  • Finds apps as you type: whole names, starts of words, initials (ss is System Settings), letters in order, and typos (chorme is Chrome). What you open often climbs.
  • System Settings panes (Mac): "login items", "wifi" or "dark mode" lists the pane, under the apps, and Return opens System Settings right at it.
  • Completes inline: the rest of the top app's name, or of Google's top suggestion, is drawn faintly after the caret. Tab or → takes it; Return never does.
  • Does math: 2^10 * 3 answers 3,072 (and 0xC00). Return copies it.
  • Converts currency: 100 USD to EUR (or 100usd in sgd) uses Frankfurter's ECB daily rates. Return copies the amount. Offline or a failed fetch shows that the rates are away — never a made-up number.
  • Tests network speed (Mac): type speedtest and press Return to run Apple's built-in networkQuality test. It uses internet data; results appear in Nanolight, where you can copy them or run the test again.
  • Google suggestions: up to four, under the apps, the words you add in bold. Nothing that reads as an address (a dot, a slash, an @) is sent.
  • Results in the panel: Return on a search shows Google's page in the panel itself. Esc goes back to the list, ⌘↩ opens it in your browser, ⌘[ goes back a page. Prefer the browser? Turn on Open Searches in Browser in Settings: Return opens your browser, and ⌘↩ shows the page in the panel.
  • Ask Grok, search X, a row away. Ask Claude too, once it's turned on in Settings.
  • Raycast extensions: extensions from the Raycast Store's repository (MIT) run in the panel: their lists, details and forms, their actions on ⌘K. Choose Install Raycast Extension… to search the store. They are React and TypeScript, so they need Node.js 20 or later on your computer; Nanolight brings none, and runs them through its own version of @raycast/api (raycast/README.md). AI, OAuth and the menu bar aren't supported.
  • Raycast script commands (raycast/script-commands, MIT): any script with @raycast.* comments, dropped in the Script Commands folder, is a row. Nanolight runs it itself, no Node needed: its arguments as a form, its output as it prints (fullOutput), its last line (compact), or nothing (silent).
  • Settings in the panel: ⌘, (Ctrl+, on a PC), the gear in the footer, or type "settings".
  • ⌘1–⌘9 run a row at once; ↑ ↓ and ⌃N ⌃P move.
  • On the Mac it lives in the menu bar: no Dock icon, and nothing drawn while it's idle. Show in Menu Bar in Settings hides the icon; Settings stays a ⌘, away in the panel.

Sync across computers (optional)

Off until you turn it on: choose Sign In with Codegraff in Settings (or the menu bar icon's menu on the Mac). Your browser opens codegraff.com to approve the sign-in, and from then on every computer signed in to the same account shares:

  • the key that opens Nanolight,
  • whether Google suggestions are on,
  • how often you open each app, so an empty panel suggests the same apps everywhere.

Two Macs merge rather than overwrite: the key and the suggestions setting follow whichever Mac changed them last, and each app keeps its higher count. Nothing else is sent: no queries, no history, no files. The sign-in key is kept in your Keychain, and Sign Out of Codegraff revokes it.

Syncing goes through your Codegraff account, so Codegraff's terms and privacy policy apply to it. New accounts made by signing in from Nanolight get $2 of Codegraff credit.

Install

From the latest release:

  • Mac: nanolight-macos-arm64.dmg. Open it and drag Nanolight to Applications. macOS 26 or later, Apple silicon. On macOS 14 and 15, 0.2.15 is the last version.
  • Windows: nanolight-windows-x86_64.zip. Unzip it anywhere you can write and run nanolight.exe. Windows 10 or later.
  • Linux: nanolight-linux-x86_64.tar.gz (or aarch64). Unpack it and run nanolight. It needs GTK 3 (or 4) and an X11 session for its key; on Wayland, bind nanolight --toggle to a key in your desktop's keyboard settings. The panel is dark when gsettings or $GTK_THEME says the desktop is. A ~/.config/nanolight/theme.json can set its colors, corner radius and font instead (dark, background, foreground, muted, accent, selection as #rrggbb, rounding, font); Nanolight reads it when it starts, and uses it while the theme in Settings is System. src/linux_theme.zig has an example.

Homebrew (Mac)

brew tap justrach/nanolight https://github.com/justrach/nanolight && brew install --cask justrach/nanolight/nanolight

This repository is the tap; the cask installs the signed .dmg from Releases, and Nanolight updates itself after that. Use the full justrach/nanolight/nanolight name: Homebrew 7 only loads a cask from a third-party tap once you name it (or brew trust the tap), so a bare brew install --cask nanolight is refused. The cask is Casks/nanolight.rb; after a release, sh macos/update-cask.sh vX.Y.Z refreshes it.

On first run a short welcome picks the key that opens it and says who else holds it. On the Mac that's ⌘Space, ⌥Space, ⌃Space or ⌥⌘Space (any other, such as ⌥X, can be recorded later in Settings; Spotlight gives up ⌘Space in System Settings → Keyboard → Keyboard Shortcuts → Spotlight); on a PC, Alt Space, Ctrl Alt Space, Ctrl Space or Ctrl Shift Space. Releases update themselves from this repository's releases, restarting into the new version while the panel is away.

Build

You need Zig 0.17.0 and Xcode or the Command Line Tools.

zig build test      # search, math, suggestions and the panel, through nanoui's Tester
zig build run       # build and open it
zig build app       # zig-out/Nanolight.app, for /Applications
VERSION=0.1.0 sh macos/package.sh   # the Mac release: signed app, disk image, update zip, manifest.json
VERSION=0.1.0 sh pc/package.sh      # Windows' zip and Linux's tarballs, added to manifest.json
zig build -Dtarget=x86_64-windows-gnu   # any target from any machine
cd raycast && npm test              # the Raycast extensions' host

macos/package.sh signs with $CODESIGN_IDENTITY and notarizes when notary credentials are set (see the script); otherwise it signs ad hoc. Pushing a v* tag runs .github/workflows/release.yml, which builds, signs and attaches the release as a prerelease, then checks it end to end before it becomes the latest: sh macos/verify-release.sh v0.2.7 checks a published release's files, its notarization and that it runs headless (safe on your Mac); macos/verify-update.sh launches it for real and updates the release before to it (CI only: it shows windows).

How it's made

File What
src/main.zig The app: the window, the hot key, the menu bar icon, updates
src/view.zig The panel: query, rows, footer, keys
src/results.zig What a query lists, in order
src/search.zig Fuzzy matching and ranking, allocation-free
src/learn.zig What ranking learns: use that fades (two-week half-life), and which app was opened for what was typed
src/calc.zig The calculator
src/currency.zig Currency: parse 100 USD to EUR, Frankfurter/ECB rates
src/suggest.zig Google's completions: the privacy guard, decoding, the cache (after browse)
src/preview.zig The results page in the panel (WKWebView, the Mac)
src/panel_mac.zig, src/panel_pc.zig The panel's window on the Mac, and on Windows and Linux
src/font.zig, src/fonts/ The panel's typeface, Nanosans, in the binary
src/linux_theme.zig Linux: the panel's colors, corners and font from an optional ~/.config/nanolight/theme.json, else dark when gsettings says so
src/hotkey*.zig, src/apps_*.zig, src/single*.zig, src/login.zig, src/keychain*.zig Each platform's key, apps, single copy, login item and secret
src/raycast*.zig, raycast/ Raycast extensions: the panel's screen, the Node host and its @raycast/api
src/script_commands.zig, src/script_run.zig Raycast script commands, run in Zig
src/onboard.zig, src/shortcut.zig, src/recorder.zig The welcome, which key is free, recording one's own
src/film.zig, src/stage.zig, tools/film.sh The walkthrough, rendered offscreen
src/promo.zig, src/promo_scene.zig, src/promo_camera.zig, tools/promo.sh, tools/promo/ The promo: nanoui's shots, Blender's laptops, the Windows and Linux recordings (docs/promo.md)

The icon is drawn by tools/icon.py. src/backdrop.jpg (the film's cover art) was made with OpenAI's image model.

License

MIT

The panel's typeface is Nanosans 0.0.3 (Geist with softened corners), under the SIL Open Font License 1.1: src/fonts/OFL.txt.

Jelajahi proyek terkait

Memuat…