fitztrev / shuttle

A simple shortcut menu for macOS
http://fitztrev.github.io/shuttle/
MIT License
4.55k stars 394 forks source link

Possible to put shortcuts in order? #255

Open lindseydiloreto opened 5 years ago

lindseydiloreto commented 5 years ago

Is it possible to put the shortcuts in order manually?

It seems they are always shown in alphabetical order, regardless of how they are sorted in the JSON.

thshdw commented 5 years ago

Hello, Yes this is in #234 I need to compile a binary.

lindseydiloreto commented 5 years ago

Excellent, thank you! Looking forward to this. 🙂

ryanmasuga commented 4 years ago

Has this been implemented in a version that is available for download? I installed 1.2.8, which I downloaded from https://fitztrev.github.io/shuttle/

tsimmons commented 4 years ago

I've compiled master and it doesn't seem to work. What is the correct way to have entries manually ordered?

I have the following snippet, in the order I want them to appear, the first two followed by a separator:

    "Network": [
        {
            "name": "adevice (1)",
            "cmd": "bla blah;"
        },
        {
            "name": "adevice (2)[---]",
            "cmd": "bla blah;"
        },
        {
            "name": "aaadevice (1)",
            "cmd": "bla blah;"
        },
    ]

The separator shows up where I want but the last item always gets sorted to the top. I have tried:

  1. Preceding all of the names with [aaa];
  2. Putting [aaa] and the end of all the names;
  3. Only putting [aaa] in front of the first two;
  4. Only putting [aaa] in front of the last entry;

What am I missing?

EDIT Figured it out:

    "Network": [
        {
            "name": "[aaa]adevice (1)",
            "cmd": "bla blah;"
        },
        {
            "name": "[bbb]adevice (2)[---]",
            "cmd": "bla blah;"
        },
        {
            "name": "[ccc]aaadevice (1)",
            "cmd": "bla blah;"
        },
    ]
eugeniumegherea commented 4 years ago

I've actually managed to sort mine using some invisible character trick

‏‏‎ ‎ <- here is an invisible character that renders as a space in VS Code, but it is invisible in Shuttle. If you prepend this to a name, it will go on top of the list

image

In my example I prepended this character to dev, stage and prod and it seems to work fine Hope it helps

ryanmasuga commented 4 years ago

I can't get separators to work, and at this point I've learned to live with whatever order Shuttle wats to put these things in. ¯_(ツ)_/¯