Jump to content

luckman212

Member
  • Posts

    405
  • Joined

  • Last visited

  • Days Won

    16

Reputation Activity

  1. Like
    luckman212 reacted to deanishe in Fallback results in script filter   
    Like David said, change your keyword and you're golden.
     
    If your keyword matches default results (or other keywords), they'll be shown until you dive down into that specific workflow.
     
    Because I prefer short keywords, I tend to prefix them with ".", e.g. ".st" or ".sf" (and in your case, ".hue"). Using a period/full stop is particularly effective, as Spotlight (and therefore Alfred) doesn't index any files beginning with a period/full stop (they're hidden files).
  2. Like
    luckman212 got a reaction from JJJJ in ClipSaver - save & convert images from clipboard history in various formats   
    v 1.1.0 uploaded, changes the bulk mode from a keyword trigger to a script filter so it can do some additional error checking and grab max_clips by counting the # if images in the history.
  3. Like
    luckman212 reacted to Andrew in Split on \t (tab) character using Split Arg to Vars object?   
    I'll add a note to think about this, as I agree, \t and \n are much more clear.
  4. Like
    luckman212 got a reaction from dfay in Include object notes in search   
    This is an excellent idea!  Another related thing on my wish list would be a dedicated "Notes" object, which ideally would be a resizable rectangle that could display text notes on the workflow editor area. Something like this:
     

  5. Like
    luckman212 reacted to dfay in Include object notes in search   
    It would be great if the preferences search could (optionally) include the notes field of workflow objects.  I have a lot of Hotkey triggers that call scripts, so there's no text that I could search for except the descriptions I've added to the objects.  Here's an example of where this feature would be useful:
     
     
     

  6. Like
    luckman212 got a reaction from deanishe in Split on \t (tab) character using Split Arg to Vars object?   
    Thanks @Andrew
    I ended up using a pipe instead but — since this tab char would be invisible, wouldn't it be more sensible to use things like \t or \n for readability?
  7. Like
    luckman212 reacted to Acidham in Enumerate all defined Hotkeys across workflows?   
    Thanks guys for the help!
     
    fyi: https://github.com/Acidham/search-alfred-workflows is now supporting keyboard shortcuts!
  8. Like
    luckman212 reacted to dfay in Enumerate all defined Hotkeys across workflows?   
    see keyword hot in
     
     
  9. Like
    luckman212 got a reaction from crs1138 in Can I Save Screenshots to Clipboard?   
    ... or Cmd+Shift+4 and then hold the CTRL key while snapping, which also makes the output go to the clipboard
  10. Like
    luckman212 reacted to Andrew in List Filter icons don't show up until clicked on [Fixed in 4.0.7 b1126 pre-release]   
    @luckman212 this should now be sorted in the 4.0.7 pre-release  
  11. Thanks
    luckman212 got a reaction from Andrew in Contacts metadata not updating until Alfred is quit & re-launched [Fixed in 4.0.7 b1126 pre-release]   
    @Andrew 4.0.7 fixed the problem! I don't really see any noticeable delay (but I am on a 6-core i7 Mac Mini 2018 so it's possible older machines might). I'm happy with this fix!
  12. Thanks
    luckman212 reacted to Andrew in Contacts metadata not updating until Alfred is quit & re-launched [Fixed in 4.0.7 b1126 pre-release]   
    @luckman212 4.0.7 is now in Alfred's updater under pre-releases, let me know!
  13. Thanks
    luckman212 reacted to deanishe in Passing '*' as {query} to File Filter... bad?   
    I didn't know that. Makes a kind of sense, I suppose.
     
     
    No idea. I've been using it for so long, I can't remember. I probably saw it somewhere or guessed based on the fact that the API accepts multiple paths.
  14. Thanks
    luckman212 reacted to Andrew in List Filter icons don't show up until clicked on [Fixed in 4.0.7 b1126 pre-release]   
    @luckman212 Thanks for spotting this - I'll get it fixed in the next release
  15. Like
    luckman212 reacted to Andrew in List Filter - match items that contain Parentheses ( )   
    I'm going to look at fixing this for 4.1, and also bringing across the options from the Script Filter when you select "Alfred Filters Results" for consistency.
     
    Cheers,
    Andrew
  16. Thanks
    luckman212 reacted to deanishe in [SOLVED] JSON Config - ??? so confused   
    Ah, right. Well, the Arg and Vars object does have variables in its configuration.

    The config object is element-specific, though. What works with Arg and Vars won't work with other elements.
     
    But I can see how that would lead to confusion.
  17. Like
    luckman212 reacted to vitor in [SOLVED] Script Filter > Choose from recent clipboard history items   
    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.
  18. Like
    luckman212 got a reaction from Chris Messina in Multiple keywords to trigger the same script filter?   
    I saw this has been asked a few times before (e.g. here) but there wasn't a clear answer.

    Since Alfred 4 is coming soon, I would like to throw this into the pot to see if it might be possible.
     
    My brain is getting old. It's hard to remember all the different keywords and hotkeys I've set up. To aid myself I like to be able to use multiple keywords to trigger the same workflow step.
     
    Example, I have a workflow for connecting Bluetooth devices, that I trigger using `bt`
    instead of just "bt" I'd like to add a few more keywords, e.g. "blue", "connect", "audio" etc.
     
    I know I can duplicate the script filter opject and connect its Output to the same step—it's a poor man's workaround, but it'd be cleaner and better to allow multiple keywords, such as this:

     

  19. Like
    luckman212 got a reaction from JJJJ in Merge last "N" number of clipboards   
    Well, that was a long & winding road. I'm new to Alfred so I'm still figuring things out. I tried everything I could to avoid using a /tmp file but this was the only way that worked. Everything else—using variables, trying to process the clipboard buffers from within the workflow itself, using external triggers etc, all failed.
     
    This seems to be due to the way Alfred processes the query buffer as it passes through the workflow. Internally, a reference like `{clipboard:11}` will always return that exact text (e.g. if used in a comparison statement from bash or python) -- it only converts it to the actual clipboard value during OUTPUT actions such as Large Type or Write Text File. The 2nd problem is, if `{clipboard:11}` contains a NULL (empty) value, instead of returning BLANK (which would be expected), Alfred insists on instead outputting the dynamic placeholder itself. So, if you have only 5 clips and you ask for 10 to be merged, the last 5 will be written out as just `{clipboard:6}, {clipboard:7}...` etc.
     
    TL;DR I could not find a reliable way to test for "empty" values and omit them from the output other than using Write Text File and then processing it with sed. This works fine though, and the script cleans up the /tmp file after itself and is pretty quick about it.
     
    If anyone knows a better way I'm all ears. But I think this is something that would have to be fixed in Alfred itself.
     
    Here's the new version:
     
    changes
    omits empty strings from output if you request > clips than exist in the history configurable MIN_CLIPS and MAX_CLIPS variables added notifications for success/failure https://github.com/luckman212/clipmerge-alfred-workflow/blob/master/README.md
     
  20. Thanks
    luckman212 got a reaction from bivalvegruff in Merge last "N" number of clipboards   
    Figured out a way - not sure if it's the "right" way but, it works well enough.
    I used a couple of bash scripts to validate/filter the input as well as loop & process the output.
     
    If you want to have a look... 
    (link removed, scroll down for the new version)
     

  21. Like
    luckman212 got a reaction from bivalvegruff in Merge last "N" number of clipboards   
    I'm trying to make a workflow that accepts a single parameter "N" (a number) and then uses that to merge the last N clipboards, and paste that to the frontmost app. Let's call it "clipmerge" and it uses keyword `cm`.
     
    e.g. "cm9" would take {clipboard:0} {clipboard:1} ... {clipboard:8} and merge them.
     
    Anyone got any ideas on how to achieve this?
     
    edit: I figured out my own solution... click here
  22. Like
    luckman212 reacted to Chris Spiegl in Feature Request: Rich Text in Snippets and Clipboard History   
    I'd love to see Rich Text in the Clipboard History. Especially with a combination of "Paste as Rich Text" and "Paste as Plain Text" (default definable by the user in the Clipboard History settings.
     
    Rich Text support for the Snippets is also something I'd be looking forward to. Personally much more rarely used.
     
    The Rich text in Clipboard HIstory though ... it's huge. I always have to use a "Text Edit" file as my rich text clipboard history ?.
     
    PS. I know that other clipboard histories support this, but I am very happy with just using one app (Alfred) to do most of these things. #NoExtraBackgroundProcesses
×
×
  • Create New...