Skip to content

Quicklinks - #8

Open
rafalyovson wants to merge 7 commits into
typecraft-dev:mainfrom
rafalyovson:feat/quicklinks-v1
Open

rafalyovson wants to merge 7 commits into
typecraft-dev:mainfrom
rafalyovson:feat/quicklinks-v1

Conversation

@rafalyovson

@rafalyovson rafalyovson commented Oct 20, 2026 •

Copy link
Copy Markdown

Quicklinks (SPEC §8.4)

Adds Raycast-style quicklinks:

  • Commands: Create Quicklink, Search Quicklinks, Import Quicklinks, Export Quicklinks. Like Raycast, Create Quicklink fills itself in from a URL or file path on the clipboard.
  • Root search: quicklinks rank like other commands (type priority 3). A typed web address (github.com/x, localhost:3000, https://…) adds a Link section with Open in Browser and Create Quicklink.
  • Actions: Open (↵), Edit (Ctrl+E), Copy Link (Ctrl+Shift+C), Delete (Ctrl+D, Raycast's Linux key from SPEC §10.3, through main's confirm alert), plus favourites and aliases.
  • Placeholders (SPEC §8.3): {argument} (name, default, options; up to 3), legacy {query} and {word:default}, {clipboard}, {selection} (primary selection), {uuid}, {date}/{time}/{datetime}/{day} with ICU formats, offsets and locale=, and every modifier. {cursor}, {snippet}, {calculator}, {browser-tab} and {clipboard offset=N} are refused with a message.
  • Arguments: main's argument pills after the search text, as in Raycast. Press Tab to move into them and Shift+Tab to go back, then ↵ to open. An argument without a default is required, and ↵ with one still empty puts the cursor there. An argument with options steps through them with ↑/↓.
  • Open With: a picker of installed apps; Default is the browser for web links and xdg-open for everything else.
  • Import/Export: Raycast's [{name, link, openWith?}] JSON. Import takes a file path, or the clipboard when the field is left empty. Export writes ~/Downloads/oma-cast-quicklinks-<date>.json and copies it to the clipboard.

Design notes

  • plugin/core/Quicklinks.js is pure JS and has no imports. RootSearch receives it through deps.
  • Links are opened from argv arrays only: omarchy-launch-browser for http(s) (the same launcher the web-search fallbacks use), xdg-open for paths and other schemes, and uwsm-app -- gtk-launch <id> for a chosen app. A link that starts with - or uses javascript: is refused.
  • Values in a web link are percent-encoded (unless | raw). Values in a file-path link are not, so ~/Notes/{argument} opens todo list.md.
  • Clipboard and selection are read with wl-paste under a 2 s timeout. It uses the data-control protocol, so it works after the launcher has closed.
  • Bare-host detection requires a known TLD, so e.g, vs.code and node.js stay searches. localhost, loopback and private IPv4 hosts open as http://; other bare hosts as https://.
  • If {clipboard} can't be read (empty, not text, or timed out), you get a notification instead of a half-filled link.

Try it

  1. Create Quicklink. Name it DuckDuckGo and set the link to https://duckduckgo.com/?q={argument name=query}. Ctrl+↵ saves.
  2. Type duck, press Tab, type a search and press ↵.
  3. Copy a URL, then run Create Quicklink: the form fills itself in.
  4. Export Quicklinks, then Import Quicklinks with an empty path, which imports from the clipboard. Everything should be reported as already saved.

Testing

  • Up to date with main through @amanmprojects' merge (b18512e): thank you. On top of it, 462497b restores two guards: the confirm alert ignores a key repeat, so a held Enter can't open and confirm a delete at once, and Ctrl+U in an empty pill no longer clears the search.
  • node --test tests/: 120 of 121 pass, also under TZ=America/Los_Angeles and TZ=Asia/Yerevan. The one failure is the installed Omarchy menu parses completely, which reads the local menu file and is unchanged from main. My omarchy-dev build has no style entry at the top of that menu.
  • On omarchy-dev 4.0.0.r7241 (Hyprland 0.56.2): argument pills with Tab, Ctrl+U in an empty pill, Delete through the alert (the alias, favourite and ranking are removed too), omarchy plugin validate, and no QML errors after reload.

🤖 Generated with Claude Code

Pure JS shared by QML and node tests: save/update/remove/import/export
with unique names, the SPEC §8.3 placeholder grammar for links, ICU
dates, web-address detection, and the argv that opens a link.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rafalyovson and others added 2 commits October 20, 2026 15:53
Quicklink rows and actions, the four Quicklinks commands, Search
Quicklinks, and Open in Browser / Create Quicklink for a typed address.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
quicklinks.* methods and store, the create/edit form with an Open With
picker, the argument form, import, export and delete confirmation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings PR typecraft-dev#8 up to date with main and joins the features both sides
built separately:

- Quicklink arguments use main's argument pills. Candidates carry
  {name, placeholder, required} plus defaultValue and options; a default
  makes an argument optional, and an option argument steps with up/down.
  The PR's own inline argument fields are dropped.
- Delete Quicklink asks through main's confirm alert instead of a pushed
  confirm-delete view.
- The quicklink form, Open With picker and import view keep their editor
  key handling alongside main's popups, filter and vim bindings.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@amanmprojects

Copy link
Copy Markdown

Hi @rafalyovson, this PR conflicts with main now. Since it was opened, main added its own argument pills for the web-search commands (28b9063), the confirm alert, the root filter and vim bindings, and dropped OverlayWindow.

I merged current main into your branch and resolved the overlap: https://github.com/amanmprojects/oma-cast/tree/feat/quicklinks-v1 (merge commit b18512e, on top of your three commits).

  • Quicklink arguments now use main's pills. toCandidate adds placeholder and required (a default makes an argument optional), ↑/↓ still steps through options, and this PR's own inline fields are removed.
  • Delete Quicklink goes through main's confirm alert instead of the confirm-delete view.
  • Everything else is unchanged: the form, Open With, import/export, the Link section and Search Quicklinks.

Unit tests pass (121), omarchy plugin validate passes, and I tested it live on Omarchy 4.0.4: argument pills, opening a link, delete via the alert, the create form.

Pick up the merge commit if you like (git pull https://github.com/amanmprojects/oma-cast feat/quicklinks-v1), or a maintainer can push it to this branch, since edits from maintainers are on. If this PR stays quiet, I can open a PR that supersedes it and keeps your commits.

…main merge

- The confirm alert ignores a key repeat, so a held Enter that opened
  "Delete Quicklink" (or Shut Down, Restart, Log Out) cannot also confirm it.
- An edit key such as Ctrl+U in an empty argument pill is swallowed instead
  of falling through and clearing the search text and the other arguments.
- Drop the quicklinks screenshot: it showed the inline fields this merge
  replaced with main's pills.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rafalyovson

Copy link
Copy Markdown
Author

Thanks @amanmprojects, I took your merge as is (b18512e), so this is up to date with main again. On top of it, 462497b brings back two guards that #8 had and main's code doesn't: the confirm alert now ignores a key repeat, so a held Enter can't open and confirm Delete Quicklink in one go (the same applies to main's Shut Down / Restart alerts), and Ctrl+U in an empty argument pill no longer falls through and clears the search. I also dropped the screenshot, since it showed the old inline fields. Tested live: pills, Tab, Ctrl+U, and delete through the alert.

cpreston321 added a commit to cpreston321/oma-cast that referenced this pull request Oct 26, 2026
Both sides extended the same places. The PR's `editor` flag now also
covers the script-menu input prompt, replacing the fork's `textEntry`;
the result list keeps the PR's form anchoring and the fork's detail-pane
width; notifications, empty states and placeholders keep both sets.
Keep main's async search, row reuse, delayed loading footer, and
clipboard paste. Keep this branch's quicklink forms, Open With,
argument pills, and delete confirmation. Tab moves between form
fields. Ctrl+U in an empty pill does not clear the search. A repeated
Enter does not confirm an alert. Keys do not change the query while
an alert is open, and the Open With list treats typing as its search.

Co-authored-by: Rafa Lyóvson <rafa@lyovson.com>
Put back the notes from the quicklinks branch, including the held
Enter guard and the oma-cast run pill prompt. Clear pendingPrompt
when the launcher hides so the next open does not focus that pill.

Co-authored-by: Rafa Lyóvson <rafa@lyovson.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants