Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 08/21/2019 in all areas

  1. 1 point
    Github: https://github.com/bmunoz89/alfred-wf-bluetooth-manager 🚨 Supports Alfred 3 & 4 🚨 💻 Installation 👾 Run this command on a terminal: brew install blueutil Now download ⏬ the last release and open it 😎. That's all!! 📸 Screenshots 🔑 Keywords bset: Set the default device bc: Connect the default device bd: Disconnect the default device bcs: Select the device you would like to connect to bds: Select the device you would like to disconnect to bm: Allows to turn bluetooth on and off, and the same for updates of the workflow Besides that, you can add shortcuts into the preferences 👌🏽
  2. 1 point
    dfay

    Use same Editor to open any file

    Regardless of file type? In any case, you can do this by creating a custom File Action. See https://www.alfredapp.com/help/workflows/triggers/file-action/ and https://www.alfredapp.com/help/workflows/triggers/file-action/
  3. 1 point
    There is plenty wrong with Bash, but nothing wrong with you using it. It’s an idiosyncratic but capable glue language that I still use regularly. You can find it pretty much everywhere and be sure it will work with some consistency. But the way you’re writing it could indeed be improved upon. It makes little sense to keep escaping double quotes when you can use single quotes. Also, there’s no need for printf '%s\n' or so many of them. A single echo (or a Here Document) suffices. Your code isn’t working because Dynamic Placeholders aren‘t meant to be used in Alfred’s non-code areas. It wouldn’t be wise for Alfred to replace them everywhere and risk breaking your code. As a workaround, you may connect a Keyword Input to an Argument and Variables Utility that saves the clipboard contents as variables to be used in the Script Filter. Be aware that there is bound to be some breakage when the raw clipboard contents interact with the code, such as when you have a quotation mark in the clipboard. That is why raw Bash is not a good choice in this case — you need to sanitise your input beforehand, and libraries are good for that. Here’s a ready-made Workflow. I’ve kept and fixed the Bash example so you can still reference how your code could have been, but the end result uses Ruby. Finally I’ll ask that in the future, when asking for help with a Workflow, please upload it somewhere as it’s hard to help without access to it. Debugging can already be hard with access to the code, even harder to do so by guessing from a description. There are multiple places where the code or Workflow setup can be wrong. Without looking at it we’re mostly shooting in the dark. The Reporting Problems with Workflows topic gives a nice overview on how to build an effective report.
×
×
  • Create New...