"Spotlight" plugin for Glyphs

I was thinking of moving the concept of having a all in one control center to Glyphs.
I like the idea from other apps like spotlight, evernote, autocad.
I find myself using these a lot when available so i gave it a try in Glyphs and must say i love it.

The sample commands available now are super simple right now.

I’d love some feedback and suggestions before i put more work into it.

5 Likes

That looks great. Good idea. If you need an help.
And it probably needs a way to be extended by the user to add their own commands.

2 Likes

I love that idea, too! I will happily offer my help as well, if you want.

Most definitely! Though i have no idea how would i do that…

Thanks for the support guys! Means a lot. Here’s some new ideas:

Things to do:

  1. Feedback running independent from the functions. Right now everything is delayed because of the notifications and animation of the window. I tried threading but i’m not sure if that’s what i need here.
  2. When i press esc the window closes but that also triggers the callbacks. So if someone starts typing “lsb 20” and hit esc this will actually call the setLSB method anyway. This needs to be fixed so that commands are only triggered when you hit enter.
  3. This is connected to another issue. There’s no predictive typing right now. I can’t expect everyone to remember all the functions. It would be nice to have this feature but i’m not sure how to implement it. I know there’s continues callbacks but i’m not sure what’s the clever way to do this. Should i just compare what i type to all keys in my dictionary letter by letter?
  4. I still can’t decide if commands should be “hard coded” or more like natural language.
    a. lsb 20 — this works only on current glyph
    b. lsb -s 2 — approach with flags; -s would apply the method to all selected glyphs, -a could apply to all existing glyphs.
    c. set selected lsb and rsb to 20 — natural language approach. this requires more typing but might be easier to remember and more powerful. biggest downside: i’m totally clueless here – is it just extensive use of regex and a lot of conditions?

Here’s the current file. It’s currently a script, i think it’s faster to develop this way.

1 Like

My thought about input: keep all the command input lowercase only – no caps or camelcase. It will be much easier on the user that way.

2 Likes

I’ll play around with it a bit.
some early throughs:

  • It needs a help screen that shows all commands
  • I would not use vanilla but cocoa directly. For special stuff like this it is much easier.
  • NSTextField has a function to show suggestions for the already typed text. But it might be nicer to build that yourself. It would fit into the line below the text field where you already give feedback.
  • I would just call it “Commandline”.
  • Decouple the input window and the implementation of the commands. Use the same mechanism that can be used by third party devs yourself. Add a registration method to a global class like GSCallbackHandler. That way it can be reached by everybody. The argument are the “trigger” string, the method to call and a sample string that can be shown in the suggestions list.
2 Likes

Do you have any examples for that? I tried the xcode interface builder but i couldn’t find a way to remove the title bar or the buttons.

Command Line is a much better name :thumbsup:

Thanks for the suggestions! I’ll look into it soon.

I would like to put a thought up for consideration.

Since the Macro Panel is somewhat like a Terminal window already why not integrate Spotlight into that, perhaps as a sub-panel?

I see the point of having something that can be brought up quickly to run certain commands. People use the Help menu search like that already.

1 Like

I found out and just wanted to share and acknowledge that FontLab VI had something similar earlier :wink:

25

I know this is an old thread, but I’m really missing something like this, at least to run scripts easily without to having to hunt for the right one. Would gladly pay for a plugin that did that.

If you know some of the name of the script, type it into the search filed in the Help menu.

1 Like
  1. Use CMD + SHIFT + / to open the Help menu search box
  2. Start typing the name of your script(or menu item) until it finds your target
  3. Return/Enter

This is handy in many applications!

2 Likes

oh, wow! how did I not know that??? Thanks!