Git Product home page Git Product logo

flow-launcher-shortcuts-plugin's Introduction

Shortcuts logo

Shortcuts Plugin
Quickly launch your shortcuts


Warning

This is a work-in-progress and not the finished product.

Feel free to leave suggestions or report bugs in the issues section.

Features

Shortcuts plugin features include:

  • Multiple shortcut types support
  • System and user defined variables support
  • Import and export shortcuts
  • Duplicate shortcuts
  • Open configuration files
  • Show list of commands
  • Show or set plugin keyword
  • Allows to modify configuration files directly

Settings

The following general options are available on the Flow Launcher settings page.

Setting Description
Activation keyword Define the action keyword shortcut to activate plugin
Shortcuts file path Path to the shortcuts file. If not set, default path will be used
Variables file path Path to the variables file. If not set, default path will be used

Usage

The following commands are available for the Shortcuts plugin.

Command Description Example
q Show available commands q to show available commands
q <shortcut_name> <optional_arguments> Run shortcut q search -q "flow launcher" to run shortcut with name search and pass -q "flow launcher" as arguments. Arguments are optional.
q add <shortcut_type> <shortcut_name> <shortcut_arguments> Add new shortcut q add directory doc C:\Users\my_user\Documents to add a shortcut named doc to the Documents folder
q remove <shortcut_name> Remove shortcut q remove doc to remove shortcut with name doc
q var list Show all variables q var list to show all variables
q var add <variable_name> <variable_value> Show or set variable q var add appdata C:\Users\my_user\AppData\Roaming to set value of the appdata variable
q var remove <variable_name> Remove variable q var remove appdata to remove variable with name appdata
q keyword get Show plugin action keywords q keyword get to show all plugin action keywords
q keyword set <keyword> Set plugin keyword q keyword set ss to set plugin keyword to ss. Existing keywords will be removed.
q keyword add <keyword> Add additional plugin keyword q keyword add quick to add quick as a keyword for the plugin.
q keyword remove <keyword> Remove plugin keyword q keyword remove quick to remove quick as a keyword for the plugin.
q duplicate <shortcut_name> <new_shortcut_name> Duplicate shortcut q duplicate doc doc_copy to duplicate shortcut with name doc to doc_copy
q config Open configuration files q config to show available configuration files
q reload Reload configuration files q reload to reload configuration files
q import Import shortcuts q import to import shortcuts from JSON file
q export Export shortcuts q export to export shortcuts to JSON file
q settings Open plugin settings q settings to open Flow Launcher settings page
q group list Show all groups q group list to show all groups
q group add <group_name> <existing_shortcuts_keys> Add new group q group add search google bing duckduckgo to add a group named search`` with shortcuts google, bingandduckduckgo` These shortcuts should already exist.
q group remove <group_name> Remove group q group remove search to remove group with name search

Shortcuts

The following shortcut types are available. More types will be added in the future.

Shortcut type Description Required arguments
directory Open directory in file explorer directory - path to the directory
file Open file in default application file - path to the file
url Open URL in default browser url - URL to open
shell Run shell command type - shell type (cmd or powershell), command - shell command arguments, silent - run command without opening shell window

Configuration files

The following configuration files are available.

Configuration file Description
shortcuts.json Contains all shortcuts. If not set, default path will be used.
variables.json Contains all variables. If not set, default path will be used.

File structure

Shortcuts

If you manually edit the shortcuts file, make sure to reload the plugin for changes to take effect. You can do that by running q reload command.

Important

Make sure that first attribute of the shortcut is the shortcut type.

[
  {
    "Type": "Directory",
    "Path": "C:\\Users",
    "Key": "users"
  },
  {
    "Type": "File",
    "Path": "C:\\Users\\my_user\\Documents\\my_file.txt",
    "Key": "my_file"
  },
  {
    "Type": "Url",
    "Path": "www.google.com",
    "Key": "google"
  },
  {
    "Type": "Group",
    "Shortcuts": [
      {
        "Type": "Url",
        "Url": "www.google.com/search?q=${q}"
      },
      {
        "Type": "Url",
        "Url": "www.bing.com/search?q=${q}"
      },
      {
        "Type": "Url",
        "Url": "www.duckduckgo.com/?q=${q}"
      },
      {
        "Type": "Url",
        "Url": "www.wikipedia.org/wiki/${q}"
      }
    ],
    "Key": "search"
  },
  {
    "Type": "Group",
    "Keys": [
      "meow",
      "g",
      "google"
    ],
    "Key": "multi"
  }
]

Variables

Variables are used to store values that can be used in shortcuts. For example, you can store your user name and use it. Variables can be used in shortcuts by using ${variable_name} syntax. To use system variables, use %variable_name% syntax. Valid variable object attributes are Name and Value.

[
  {
    "Name": "user",
    "Value": "my_user"
  },
  {
    "Name": "documents",
    "Value": "C:\\Users\\my_user\\Documents"
  }
]

Screenshots

Commands

Commands

Licence

The source code for this plugin is licensed under MIT.

flow-launcher-shortcuts-plugin's People

Contributors

mantasjasikenas avatar rahul-gill avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

flow-launcher-shortcuts-plugin's Issues

skip '-q' for syntax sugar

Thanks for great plugin.

I wanna do search flow launcher intead of q search -q "flow launcher"

skipping plugin keyword can be achievable by setting the keyword as * but i also want to skip -q.

it would be good if the argument value is assigned to the argument name in url automatically, when there is only one argument.

thanks!

Feature Request: Add Dynamic Variables (Vars) for URL Web Searches

Feature Request: "Dynamic Variables" (URL)

Description:
Instead of just static variables that are pre-defined before a call to _**q list ShortcutName ** [choose your URL], allow the user to select a URL from q list and then type in an optional search string, then perform the URL load.

Example URL:
https://www.google.com/search?q=**_coding+games_**&sca_esv=5854313 ("coding games" is the "Dynamic Variable (Var)".)

"coding games would be typed after the q list [choose an entry here] coding games.

Use-Case:
This would be helpful for forums, general search engines, etc. I want it for searching online help documents I use for development applications I use.

Feature Suggestion: Set Application

Is it possible to set a specific application for a file or a URL to open in instead of the default application? I could see it reverting to the default app if there is not one manually specified, but personally would find it very useful to set specific apps for different files or particularly URLS.

Thanks for the great plugin!

Add file URL support

It would be nice to have the file Url type. For example...

  {
    "Type": "Url",
    "Path": "vscode://file/c:/programming/code/my_code/vscode/emerald-sky/",
    "Key": "vsc_emerald-sky"
  },

I can add this without error to the shortcuts config file, but nothing happens.

Feature Request: Add Indication of Loading In Progress (to handle files or groups of files that are slow to load)

Greetings! I am appreciating your plugin, but am running into a curious issue. I am on a new, fast desktop computer with a NVMe M.2 SSD. I have defined a shortcut group comprising of 3 files (two Excel spreadsheets and one Access database), all stored on the SSD. When I execute this group via keyword it can take >10 seconds for anything visually to happen on the screen, which has at times led me to mistakenly interpret that the plugin had not executed my command (and so I hit Enter again, which results in files being opened twice eventually).

I have done some testing the and the delay has nothing to do with the plugin, but rather is the result of the Microsoft Access database being slow to open (and it was originally first in the Group). If I change the Group order so that the Excel files are first then I do see both of them open rapidly (and the Access database follows eventually after).

Since the Shortcuts plugin has no way of knowing how long a file will take to load, it seems it could be helpful if there were some sort of visual indication that the executed command was received (so that the user doesn't just keep hitting Enter, errantly). Or is this perhaps something that would be more appropriate to add to Flow Launcher core? Either way, some kind of UI visual feedback that the command was received might be good (if possible). This is not a pressing need for me since I've changed my Group order so that the faster loading Excel files are first, but it seemed worth posting about this since it might come up for other users at some point.

Thanks for reading and considering my suggestion! :)

Feature Request: pull shortcut Icons

It would be great to pull the icons of linked shortcuts/executable files.

This would enhance link identification. Example Below:

8YxuNSBxEg

Great Plugin! Thanks.

Support passing dynamic args & batch run shortcuts

Hey great plugin.

Wondering if you plan to

  1. Support dynamic args so it would be something like q add shopping_urls https://www.google.com/search?q={q}, where user can pass in the arg q shopping_urls -q something
  2. Support batch shortcut open operations where you can trigger all shortcuts with the same name or 'group name'.

Reason for this suggestion is I feel this plugin is a suitable one for solving a popular requested feature in the WebSearch plugin

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.