Jump to content

Chris Messina

Member
  • Posts

    451
  • Joined

  • Last visited

  • Days Won

    28

Posts posted by Chris Messina

  1. 10 hours ago, Alan He said:

    When active on any workflow and hotkey- F, cursor should move to Filter input.

     

    I realized that it was silly that this doesn't already work this way, so I went ahead and made a Workflow to enable this! (Note, this will only work when Workflows are visible).

     

    image.png.3083ca682f7f883246ec37a947781002.png

     

    Download Filter Alfred Workflows

     

    Maybe @Andrew can fix this in the next build and/or add more accessibility features to make it easier to script the UI since the sidebar is a custom UI component that isn't accessible via AppleScript.

  2. 9 hours ago, Alan He said:

    When active on any workflow and hotkey- F, cursor should move to Filter input.

     

    +1. At the very least, it should be possible to use a keyboard shortcut to put focus on the Workflow Filter input.

     

    This is preferable over the Alfred-wide Search Preferences because:

    1. There's already a dedicated input field for this purpose.
    2. Limiting scope to workflows enhancing the productivity of this interface.

    For example, if I wanted to find all of my "Toolkit" Workflows, this is what Search Preferences yields, which searches inside of workflows:

     

    image.thumb.png.2fdffea416c9c221b0d4d15f382f9c15.png

     

    In contrast, I only want to see the Workflows themselves:

     

    image.thumb.png.4c22172874f42458029d531125485f05.png

     

  3. 25 minutes ago, deanishe said:

    I'm getting OS names mixed up again like a fool. The page says it doesn't work on Monterey.

     

    Ah, makes sense. Yeah — I talked to the developer and he did mention that Apple has a tendency to switch up the DND API... and it's very likely there'll be some wonkiness w/ Monterey given its big push on focus modes.

  4. 13 hours ago, deanishe said:

    And this may also be precisely why some Alfred users prefer Alfred over Quicksilver (or whatever) to begin with.

     

    Actually, you can achieve something similar to QuickSilver with File Actions... @iandol if you make a selection in Finder and then hit the Actions Hotkey (specified here):

     

    image.thumb.png.87df45238879f09ac329d3b689ea1bff.png

     

    You'll get an action menu like this (which you can customize), which is reminiscent of QuickSilver:

    1565056988_CleanShot2021-06-04at17_31.47@2x.thumb.png.7475a23d0facf4594b586e61c5d0ae43.png

     

  5. On 6/1/2021 at 8:02 PM, Mr Pennyworth said:
    • Did you also find out about the cleanshot:// urls from Raycast? If not, please do tell how you went about it, it might come handy for other apps!

     

    Yes exactly! It was the Raycast extension that lead me to create my Workflow. 

     

    On 6/1/2021 at 8:02 PM, Mr Pennyworth said:
    1. Did you extract those icons from CleanShot's assets.car? If not, again, please do tell! (I have zero design chops or any related abilities, so it might come handy to me later on)

     

    Also yes! 

     

    I have a Workflow that will extract Asset Catalogs with a hotkey. I use it constantly! Let me know if I should release it.

     

    BTW, I'm in touch w/ the Cleanshot developer. If there are features or improvements you'd like to suggest, let me know! 

     

    image.thumb.png.176c30acd2ff9d5881f4ebfcc67e869a.png

  6. 6 hours ago, deanishe said:

    The question marks are around its usability, imo, because it won't work out-of-the-box if it requires external processors.

     

    Hopefully this week I'll get to try something out with a Workflow and Snippet Triggers, which I haven't explored yet. I'm thinking maybe I can take parts of @vitor's MarkdownTransform and combine them with snippet substitutions to achieve dynamic, multi-variable insertion, while storing the snippet template in Markdown.

  7. On 8/28/2014 at 2:31 PM, dfay said:

    @patrickmcd I'll do this in a separate workflow

     

    @dfay did you end up releasing a fuller featured Case Converter with those additional options? I'd be interested in it. 

     

    FWIW, I also cleaned up your workflow (download) a little bit to offer some synonyms (I would forget about the `cc` keyword) and also added notes to the scripts to make it easier to associate my preferred hotkeys:

     

    image.thumb.png.3b3fe640eea15885bf6fbd78cc00124f.png

  8. 17 hours ago, vitor said:

    Sincerely, I have no clue how you take “rejecting the idea” from there. Everything in my post was in good faith and is about trying to make your idea a reality in any form.

     

    Apologies @vitor, I think we're mishearing each other again. I shouldn't have used a word like "rejected" when you were offering good-faith feedback. I retract that characterization.

     

     

    17 hours ago, vitor said:

    You should [come in with a specific solution per se], though. Because someone will have to come up with it, and the more work you do beforehand to help, the likelier it is to happen. You’re a designer, coming up with how it should work given the constraints is your strong point.

     

    You're right. I need to spend more time fleshing out my particular needs to make this request more concrete. The origination was frustration with the formatting idiosyncrasies of RTF and wanting to be able to use something in between plaintext and RTF for my snippets, so I could find more reliability and transparency.

     

    Since I've become more comfortable with Markdown, it seemed like a suitable answer. In my mind, I just seemed like if I could store my snippets in Markdown within Alfred and then choose whether Alfred converts the Markdown into HTML or RTF based on the targeted application, I'd have a solution that would meet my needs.

     

    But I need to go deeper and develop test use cases to demonstrate why the current solution is insufficient to meet my needs.

     

     

    12 hours ago, deanishe said:

    Why aren't we talking about the ability to run snippets through any processor?

     

    Actually, I appreciate that suggestion — but I'm also hyper sensitive to the tension between overfitting to my own needs (and thus reducing the value of my original proposal) and exploding scope such that the amount of work required to achieve the desired outcome would be unreasonable.

     

    There's certainly leverage to be found in building a frameworks that benefits the many (i.e. an Alfred-native mechanism to enable any text processor for Snippets) vs building a one-off solution, especially if the pathway is more or less generalizable (i.e. if you can support processing via Markdown, you could also support HTML, LaTex, etc).

  9. 59 minutes ago, vitor said:

    The closest we could get to a universal solution would be parsing the Markdown into RTF and then pasting that, which I do with MarkdownTransform. While a possibility, I will point out it’s rife with tradeoffs. The way I do it is by first transforming from Markdown to HTML and then the HTML to RTF, but the bigger issue is the disparity of features. There is a lot that Markdown supports that RTF doesn’t and some things RTF needs that Markdown doesn’t consider, so the question as to what to do in those cases would need to be fleshed out first.

     

    I hear you and agree that there are many trade-offs to consider. 

     

    I didn't want to come in with a specific solution per se, but let me try a few observations:

    • Maintaining snippets w/ placeholders in rich text can be a bit finicky, especially if you want to use a text editor or IDE to work w/ your content.
    • Similarly, passing RTF formatted text back and forth between workflows or Snippet Triggers seems more complex than Markdown-formatted plaintext.
    • Markdown-flavored plaintext is transparent and easier for me to work with given the snippets I use most often.
    • I don't use more advanced Markdown features (like tables, LaTeX, or images) so am mostly looking for parity w/ the existing Alfred RTF tooling
    • If images are to be used, they could be URL-encoded and embedded into the snippet directly (though not ideal)

    The flow would be to run all the content substitutions in the plaintext content BEFORE the step of converting the Markdown to RTF, which would then be pasted into the target — same as what you do and this the approach I wanted to build on.

     

    1 hour ago, vitor said:

    seems to me a superior solution would be to manually convert your Markdown text to Rich Text first then pasting that into Alfred. That way you already see what the result will be and can tweak it to add extra stuff.

     

    Yes, this is possible — perhaps unlike other folks (especially actual developers) I like to keep my content in or as close to the app I use it with or access it through as much as possible... In other words, if my Markdown content is external and I need to paste the RTF conversion into Alfred, that kind of defeats the productivity I'd hoped to gain by making my snippets easier to maintain in Markdown from within Alfred itself.

     

    Perhaps a different way to have a go at this is instead to think about the best use cases for Markdown-formatted snippets and optimize for the 80% use cases before rejecting the idea because this method would break in 20% of use cases?

  10. 10 minutes ago, deanishe said:

    But the script is inherently fail safe because it will error out decoding the file and never run the code that overwrites it.

     

    Here's what I came up with — seems to work:

     

    import json
    import sys
    
    for path in sys.argv[1:]:
        with open(path) as fp:
            data = json.load(fp)
    
        with open(path, 'w') as fp:
            try:
                json.dump(data, fp, indent=4, separators=(',', ': '))
            except TypeError:
                pass

     

    How might I add a file count which gets passed to a notification? I can probably figure out the count, but I always struggle with how to pass a variable from a Script Filter to another block. 

  11. 1 hour ago, deanishe said:

    Your File Filter doesn't accept anything else.

     

    Right, but the keyboard shortcut bypasses that check — which is how I accidentally replaced the contents of an XML file with the path of the file... however, I just tried this again with your method and it does seem like the function won't run if it doesn't find a suitable JSON object ("No JSON object could be decoded") so I see your point! 

     

    I will work on the try … except clause in my main loop though!

  12. Given my recent discussion about formatting issues with RTF Snippets, it occurred to me that Markdown-formatted snippets could be really useful. 

     

    There are some existing Markdown Workflows for Alfred like MarkdownTransform and Alfred Markdown Notes and so while I might attempt to create a Nested Snippets Workflow that allows storing snippets in Markdown and then passing them through a Markdown parser before pasting the results, being able to specify Markdown as another properly support snippet format in Alfred could be very handy.

×
×
  • Create New...