Skip to content

Conversation

@carmilso
Copy link

@carmilso carmilso commented Nov 5, 2025

This enables better integration with external applications and automated workflows by providing a user-friendly way to open shortcuts programmatically.

  • Add deeplink support that allows opening specific shortcuts via URL using their name instead of ID
  • Implement case-insensitive name lookup in ShortcutService with proper error handling and user feedback

Example of usage for Hyprland:

bind = $mainMod, G, exec, vicinae 'vicinae://extensions/vicinae/shortcut/open?arguments={"name":"Google search"}'

@aurelleb
Copy link
Contributor

aurelleb commented Nov 5, 2025

while this works, I'm not sure implementing this as a command is the best way to do it, as a shortcut is not really an extension properly speaking.
I was thinking about handling it as a separate case here:

tl::expected<void, std::string> IpcCommandHandler::handleUrl(const QUrl &url) {

@aurelleb
Copy link
Contributor

aurelleb commented Nov 5, 2025

and then something like that: vicinae://shortcuts/<shortcut_id>?arguments=blahblahblah

Add case-insensitive name lookup for shortcuts to enable deeplink functionality
Implement vicinae://shortcuts/<name_or_id> URL handler that allows opening
shortcuts via deeplinks. Supports both name (case-insensitive) and ID lookup,
opening the window with the shortcut pre-selected in the search
@carmilso carmilso force-pushed the feat_add-deep-links-for-shortcuts branch from e3fda9e to ec8bb72 Compare November 5, 2025 10:18
@carmilso
Copy link
Author

carmilso commented Nov 5, 2025

Thanks for the suggestion, that makes more sense. I rewrote the commits and implemented it your way. Now you can do:

  • vicinae "vicinae://shortcuts/Google search"
  • vicinae vicinae://shortcuts/Google%20search
  • xdg-open "vicinae://shortcuts/Google search"

@carmilso
Copy link
Author

carmilso commented Nov 5, 2025

Only thing I kept is the name instead of the ID, because the user knows the name, but not the ID that vicinae assigned to that shortcut.

@rithvikvibhu
Copy link
Contributor

Are names unique? Can 2 shortcuts have the same name?

@aurelleb
Copy link
Contributor

aurelleb commented Nov 9, 2025

@rithvikvibhu they aren't.

@carmilso we need to use the ID here as well, this is not an issue. Like we do for extensions, we can add a 'copy deeplink' action to make it easier to get the full deeplink

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.

3 participants