mantasjasikenas / flow-launcher-shortcuts-plugin

A powerful Flow Launcher plugin for quickly opening users defined shortcuts.
34 stars 2 forks source link

Define single key in a group #23

Closed DRYN07 closed 2 months ago

DRYN07 commented 2 months ago

Is it possible to define single keys in a group?

For example lets say I have a group key to search on image sites (freepik, unsplash etc) but I also use these sites separately as well. Is it possible somehow or I must duplicate those for single usage?

[
  {
    "Type": "Group",
    "Shortcuts": 
    [
      {
        "Type": "Url",
        "Url": "freepik.com/search?q=${q}",
        /* can I set a key here? */
      },
      {
        "Type": "Url",
        "Url": "www.unsplash.com/search?q=${q}"
        /* can I set a key here? */
      }
    ],
    "Key": "search"
  }
]
mantasjasikenas commented 2 months ago

It will not allow invoking inside shortcuts if you set the key inside. The solution is to create separative shortcuts and add them to the group. Example of this:

[
  {
    "Type": "Group",
    "Key": "search",
    "Keys": ["freepik", "unsplash"]
  },
  {
    "Type": "Url",
    "Url": "freepik.com/search?q=${q}",
    "Key": "freepik"
  },
  {
    "Type": "Url",
    "Url": "www.unsplash.com/search?q=${q}",
    "Key": "unsplash"
  }
]
DRYN07 commented 2 months ago

Perfect, thanks :)

DRYN07 commented 2 months ago

And is it possible to add more than one key to a shortcut?

mantasjasikenas commented 2 months ago

Currently, no, it's not possible to add more than one key to a shortcut. However, this functionality could be added relatively easily in future updates

DRYN07 commented 2 months ago

If you have time in the future, I would appreciate it. Since there are already so many shortcuts to remember in daily work, I often encounter the issue of "here they write it this way, there they write it that way," and it would help a lot if more could be defined. By the way, I just want to note that the plugin is brilliant and deserves many more stars.