Jump to content

deanishe

Member
  • Posts

    8,759
  • Joined

  • Last visited

  • Days Won

    522

Everything posted by deanishe

  1. View and change your network location from Alfred. Installation Download the workflow from Packal or GitHub. Usage netloc [<query>] — Show list of network locations filtered by <query> if one is specified ↩ — Activate selected network location ⌘+↩ — Open Network Preferences ​Note: You will probably be asked to enter your password to change the network location. Licence This workflow is released under the MIT Licence.
  2. You can search Packal from within Alfred, and you will very soon be able to update workflows from within Alfred, too. (The current beta of the workflow is fully functional, but we're still trying to finalise the bundler, which it depends on.) What do you mean by "standardised"? Packal is a standardised way for sharing your workflows. If you mean "official", I think that's a red herring. Sublime Text and Vim do wonderfully well with their non-official plugin management systems. This forum seems to be the "official" way to distribute workflows, and Packal is far better suited to the task. "Official" only beats "un-official" if it's also equal in every other respect… I've been having a dig around the Launchbar extension docs, as the execution model is far more attractive than Alfred's extremely limited one, and the thing that struck me is the requirement for extensions to be signed. That's a fairly large hoop to jump through, imo, unless there's somewhere you can get free certificates suitable for signing code (startssl.com perhaps?). Self-signed certificates are understandably not acceptable, and there's no way I'm paying Apple $100/year to be able to write Launchbar extensions… Agree 100% with Alfred making its other UIs available to workflows.
  3. Significant update. See OP. No longer as simple (to write) as I'd hoped, but the workflow now supports finding files in hidden directories.
  4. So, I updated my ST projects workflow. locate turned out to be something of a dead-end (its database is so rarely updated), but I added it anyway, and also support for searching individual folders with find that mdfind otherwise wouldn't search. In addition, you can also specify globbing patterns that will exclude matching paths from the results. Note, the searching takes place in the background, so the workflow always remains responsive (in fact, it's faster than before), even while updating. It just might take a few seconds for new files to show up in the results.
  5. Is that the workflow I wrote? I had the same problem myself with my ~/.dotfiles folder. I tried a few things to get mdfind to return the contents of hidden directories, but it won't One alternative is to swap out the mdfind command for locate '*.sublime-project', but this is a lot slower and returns results you definitely don't want, such as .sublime-project files located within installed apps' bundles. My current workaround is to just keep the project files in another directory. It's no biggie, as I only ever open them via Alfred. Still, I'd like this to work, too, so I'll see what I can do.
  6. Yeah. Also try creating a Smart Folder that contains your Markdown files and see if that shows all the files.
  7. This one so much. Multi-level workflows are so common, and the current "hacks" of using special delimiters or calling back into Alfred via AppleScript look ugly and amateurish and complicate the coding of workflows significantly. Proper support for multiple levels (so you can drill-down and back out like on iOS apps) would be a massive help.
  8. Sublime Text Projects Filter and open your Sublime Text project files. It can be tricky getting .sublime-project files to work because Sublime Text doesn’t open them properly; only the command-line program does. This workflow solves that problem. The workflow also supports a VS Code (or VS Codium) mode (i.e. it works with .code-workspace files instead). Installation Download the Sublime-Text-Projects-X.Y.Z.alfredworkflow and double-click to install. Usage There is one keyword, .st, which works as follows: .st [<query>] — List/filter your .sublime-project files files ↩ — Open result in Sublime Text⌘+↩ — Reveal file in Finder .st rescan — Reload cached list of projects .st config — Show the current settings Hotkeys There are two Hotkeys (coloured red) for opening selected files in Sublime Text. One is for Finder/Path Finder, and the other for all other apps. Assign the same Hotkey to both. The Finder/Path Finder Hotkey doesn’t use “Selection in macOS”, and opens the target of the frontmost window if nothing is selected. Universal Actions There are “Open in Sublime Text” actions for files, text and URLs. Files are opened, and text is opened in a new document. Multiple URLs are treated like text, but if you pass a single URL to the Universal Action, the workflow will create a new document with the content fetched from the URL. External Triggers There are External Triggers you can call to create a new document with the given text, open the given file, or retrieve the given URL and create a new document with its contents. See the docs on GitHub or select “View Help File” from the workflow config view for more info.
  9. Hmm. If you're only using .md for markdown files, I don't know. Sometimes, resetting the file filter can help.
  10. Hmm. What about the file extensions? .md is mapped to net.multimarkdown.text on my system, for example.
  11. Indeed, but the VM it's running on isn't as interesting as what libraries they may have added to it, hence why I mention node, not V8.
  12. That's why I hate it. The syntax is incomprehensible. I wonder how fast JavaScript will run as a scripting language. The scripting bridge is hideously slow. Fingers crossed they've done something about that, but I'd be surprised if JS runs noticeably faster than AS, regardless of how fast JS VMs have become. Do you know anything about Apple's JS runtime? I'm guessing it won't have the kind of IO features etc. that node does.
  13. you can search Packal via CLI if you pull the Python script out of my workflow. Afraid the output is XML, though
  14. Atom/node packages don't *have to be* published in the central repository, only if they want to be installed merely by name (or included in Atom's UI). You can't force people to publish their work in a particular place, but if we push Packal as *the* place to go, it may become a de facto central repository (like PyPi) if not a de jure one. Versioning would be useful, and Packal already understands versions, but it currently doesn't support multiple workflow files (e.g. previous versions) per entry. You could ask Shawn to put it on the wishlist.
  15. Try Packal.org. Here's a workflow to search the site. One that can update your workflows is in the works. A command-line solution (like npm or Atom) isn't a good solution for non-developer tools (though I'd be happy to have one).
  16. Wouldn't have been my first (or even fourth) choice as a new scripting language of OS X, but it sure is a massive improvement on AppleScript. Man, I hate that language. This is one time I'll be happy to reimplement loads of my code in a new language.
  17. I understand he's talking about some kind of completion. But what? Does he want to run a live bash/zsh session in Alfred? Does he want to see the titles/cwd's of tabs currently open in Terminal/iTerm 2?
  18. Righty. I'd better update my local version again, too. FWIW, calling bash scripts with sh or /bin/sh is not advisable: it is bash on OS X (though it didn't use to be), but it's dash on Ubuntu, for example. Best to explicitly use bash.
  19. What's more, this won't work as intended: if [[ $status -gt 0 ]]; then echo "Update failed" >&2 echo $status exit $? else # Run update-the-bundler.sh /bin/bash "${file}" echo $? exit $? fi $? is the exit status of the last run thing, so in those cases your calling exit with the result of echo statements, not the previous command.
  20. I'm not calling it from bash… It doesn't matter: I call update.sh first, then see about updating pip and the wrapper script while it's doing its thing.
  21. Oh yes there is… The code was working, you know. You return from a function, exit from a script.
  22. Welp, I just pushed another fairly large update to the Python bundler to ensure it updates all external files if they've changed. It shouldn't break existing installations (I think the metadata is still compatible), but might.
  23. Sure, but I don't want to have to worry about breaking your stuff. Anyway, we'll have to see what Shawn has to say. It's his baby, and he gets to choose when it's in a useable state. When exactly did you push the update? I either fixed the updater this afternoon or completely broke it…
×
×
  • Create New...