Jump to content
Ryan McGeary

Alfred Emoji: Search emojis by name or keyword

Recommended Posts

9 hours ago, deanishe said:

In any case, both best practices can usually be followed by using /usr/libexec/PlistBuddy -c "Set :version \"X.Y.Z\"" info.plist to update the file in place instead of generating it from a template.

 

 

Good point regarding using the mac tools for manipulating the XML. But, it's probably best to use /usr/bin/plutil, because that's actually in a directory originally intended for interactive command line execution.

 

9 hours ago, deanishe said:

I'm pretty sure you're right. I just checked your post on my up-to-date iPhone and I can see something not at all like a dumpling. On my Mac, I just see the "unsupported Unicode" box :( 

 

?. Yes, German-style dumplings are very different from dumplings (and variants like pierogies) ? around the rest of the world. 

 

15 minutes ago, nikivi said:

Would it be possible to use Sindre's approach to node workflows. Like what he does with Alfred NPM.

 

He calls the Script Filter with: ./node_modules/.bin/run-node.

 

Where run-node script looks is this. I think this will let you avoid bundling node with the workflow.

 

I say no. You cannot guarantee that someone already has node.js installed on their machine. Not to mention, every version of node varies in functionality quite a bit. You could always code to the least common denominator of Node LTS, but that would also be a support nightmare when people simply install an out-of-date version.  It's not ideal that the workflow size is big (18MB zipped), but we can guarantee that it will work on everyone's machine within nothing more than a standard *.alfredworkflow install.

 

Btw, most Alfred workflows suffer from this least-common-denominator language versioning issue by not being able to specify runtime versions.

 

Now, what might be more interesting would be to write an alternative script to `run-node` that lazily installs node in real-time if it cannot find a reasonable runtime.

Edited by Ryan McGeary

Share this post


Link to post
14 minutes ago, Ryan McGeary said:

But, it's probably best to use /usr/bin/plutil, because that's actually in a directory originally intended for interactive command line execution.

 

plutil can't actually edit property lists. If PlistBuddy's location is a genuine problem, there's /usr/bin/defaults.

 

20 minutes ago, Ryan McGeary said:

Btw, most Alfred workflows suffer from this least-common-denominator language versioning issue by not being able to specify runtime versions.

 

It's a tradeoff between the convenience to the developer of picking their own preferred runtime and the inconvenience to the user of a workflow being tens of megabytes larger than it really need be.

 

If every developer bundled their preferred runtime instead of using one of the (sometimes quite old) ones built into macOS, it would suck for users. Especially those who sync their workflows via Dropbox.

 

1 hour ago, Ryan McGeary said:

Now, what might be more interesting would be to write an alternative script to `run-node` that lazily installs node in real-time if it cannot find a reasonable runtime

 

It's been tried, and it kinda sucked. The main issue is that it makes workflows that should work perfectly offline suddenly dependent on some service or another. Combine that with link rot and a common tendency for people to lose interest in maintaining their workflows, and you end up with broken workflows that would otherwise still work perfectly.

 

It's workable if you totally nail it the first time and the download URLs of the runtimes are never going to go away. But it would still suck from time to time for someone who just wants to look up an emoji, but the new version of the workflow also wants a new runtime, and they're currently offline, or stuck on a really crappy connection.

 

1 hour ago, Ryan McGeary said:

You cannot guarantee that someone already has node.js installed on their machine

 

Sindre kinda gets around that by telling you to install his workflows via npm. Globally, of course. Which sucks if you sync workflows.

 

2 hours ago, jsumners said:

Yes, it is ***very*** frustrating that Alfred's info.plist schema is not documented anywhere and to add new things (e.g. a hotkey item) requires tinkering around in Alfred to figure out what it does to the plist. But it's far easier to do that tinkering and then migrate the differences to the *very rarely* changing source XML than it is to constantly try to keep the "real info.plist" in sync with the source repository.

 

I'm having a hard time following your logic. Yes, it is bloody tricky to edit info.plist in any other way than via Alfred Preferences, which is one of the reasons most people avoid doing it to any significant extent unless the workflow functionality requires it. But that doesn't seem to be the case here, and I don't understand how reverse-engineering info.plist is easier than keeping it in sync with the repo. Why can't you use sym-/hardlinks?

 

Share this post


Link to post
4 hours ago, xilopaint said:

I don't know others, but I'd rather the default action was auto paste.

 

Very unlikely. I think that would violate the POLA. The default behavior of Alfred is to add items to the clipboard upon hitting [return].

 

I suggest using a keyword snippet instead. If the workflow is instantiated from a keyword snippet, it automatically pastes.

 

34 minutes ago, iandol said:

I would prefer paste as default too, could this be controlled with filters and a user variable?

 

Yes, that already exists. Assuming that you have at least v1.6.0 installed, just set the `snippetapp` environment variable (to any value) in the workflow configuration to change the behavior to always paste the emoji character regardless of how the workflow is instantiated.

Edited by Ryan McGeary

Share this post


Link to post
On 1/25/2018 at 9:08 PM, Ryan McGeary said:

Assuming that you have at least v1.6.0 installed, just set the `snippetapp` environment variable (to any value) in the workflow configuration to change the behavior to always paste the emoji character regardless of how the workflow is instantiated.

 

Could you please elaborate on how to do this for a newbie like me? I'd also like to make pasting the default action, as opposed to copying to the clipboard. Thanks!

Share this post


Link to post

I absolutely love this workflow, and I use it every day!

 

One thing I've tried to change myself but I'm having no luck in doing it at all. Is there a way to paste to the emoji just by hitting the return key rather than the [cmd]+[return] I want to hit the return key on the emoji and have it paste directly to the foremost app instead of having to use the hotkey.

 

I'm sorry if this has already been covered I've seen stuff around this, but as a total novice at these workflows, I may have missed the point in other posts.

Share this post


Link to post
3 hours ago, TychoX said:

@gerrymcil, that's exactly what the screenshot two posts above you covers. Let me know if you have any issues with it!

I'm really sorry! I knew it was staring me in the face in this post and I was't taking my time to read it properly! 

 

Thank you so much!

 

Sorry again, I know it is annoying when the answer is obviously staring me in the face 🙈

Share this post


Link to post
11 hours ago, gerrymcil said:

I'm really sorry! I knew it was staring me in the face in this post and I was't taking my time to read it properly! 

 

Thank you so much!

 

Sorry again, I know it is annoying when the answer is obviously staring me in the face 🙈

 

No worries. Glad that I could help!

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...