Jump to content

sindresorhus

Member
  • Content Count

    10
  • Joined

  • Last visited

  1. I'm aware of all this. Was just pointing out that Alfy makes it easier to create workflows using Node.js as it works around that limitation.
  2. That's not the user's custom $PATH. That's the default $PATH defined by macOS. And nobody starts Alfred from the command-line. I meant that when Node.js is installed the `node` binary is not available by default, since it's installed in `/usr/local/bin`, which is by default not in the $PATH in Alfred. Alfy works around this by getting the user's $PATH, so running `node` in Alfred just works when Node.js is installed. This is nice as otherwise you would have to instruct users to manually set the location of the `node` binary.
  3. @deanishe I'm aware of this, but I was looking for a way to do it completely programmatically without having to resort to any more workflow nodes or variables. In Alfy, I would have liked to create some reusable dynamic menus that users could make use of without having to add anything extra in the workflow view.
  4. The hard part about using Node.js with Alfred is that the user's $PATH is not defined, so the `node` command is by default not available. I made a helper library, Alfy, that solves this and adds many useful utility methods.
  5. Yup, I ended up having to extract it out of the info.plist: https://github.com/sindresorhus/alfy/blob/42c59bc7d53f5d2fcbbfc1d45386bd1d99b2dea9/index.js#L29
  6. https://www.alfredapp.com/help/workflows/script-environment-variables/ Alfred already exposes info such as `alfred_workflow_name`, so it would make sense to also add `alfred_workflow_version` too. This can be useful to for debugging purposes and migration scripts.
  7. Currently, if I output the following: {"items": [ { "title": "Foo", "arg": "unicorn" } ]} I have to handle the `unicorn` arg in a connected output action in the workflow. It would be useful to be able to dynamically handle it without needing to create an output action. This can be useful for very dynamic results and creating reusable modules that create output with different actions. I propose adding a `script` property to the JSON format that when specified makes it not pass the output to any connected output action (like `valid: false`) and instead executes the `script` and passes `arg` to it. {"items": [ { "title": "Foo", "arg": "unicorn", "script": "run-foo.sh" } ]} This would make script filters a lot more powerful.
  8. Find relevant emoji from some text. Useful when you want an emoji for something, but don't remember where to find it. More on GitHub
  9. Search for npm packages with npms.io. Useful for Node.js and front-end developers. More on GitHub
  10. sindresorhus

    Simple Theme

    Just a minimalistic theme. Download
×
×
  • Create New...