Jump to content

sepulchra

Member
  • Posts

    374
  • Joined

  • Last visited

  • Days Won

    24

Reputation Activity

  1. Like
    sepulchra reacted to vitor in Simple Ideas: chewing the FAT (Universal Actions for files)   
    And so incredibly simple. A contender for the shortest code: /bin/cat "${@}".
  2. Like
    sepulchra got a reaction from vitor in Simple Ideas: chewing the FAT (Universal Actions for files)   
    I love the File Contents automation task. It is so incredibly useful.
  3. Like
    sepulchra reacted to Stephen_C in Simple Ideas: chewing the FAT (Universal Actions for files)   
    Background
    We know that Universal Actions can intelligently divine whether we are dealing with some text, a URL or files. So what's the point of having a trigger that's a specific Universal Action for files?

    Alfred's File Action Trigger in fact provides us with much more control when dealing with files than do more general Universal Actions.

    Open wide…let's pop in the skeletal workflow.

    The skeletal workflow


    Explanation
    We have a very simple workflow: all it's designed to do is to copy to the clipboard the contents of any single text or markdown file that we select.

    1. The File Action Trigger is the secret of this workflow. Here's what it looks like when we double click on it:


    It allows us to restrict the types of files which, when selected, result in this workflow showing in our list of Universal Actions. Obviously we don't want to attempt to copy to the clipboard the contents of any binary files, for example, so we drag and drop into the Types: box samples of the files we do want to include. (If we use the + sign to add file types we're going to need to know the Uniform Type Identifier—UTI—of each file type that we add…so maybe drag and drop is easier in this case.)

    The Name: is what will appear in our list of relevant Universal Actions when we select an appropriate file so it's worth making sure we choose a helpful name.

    In this case we have selected Single Input Arguments because it makes little sense trying to copy to the clipboard the contents of multiple text files (the alternatives are Single and Multiple and Multiple: both of which are useful when dealing with operations like moving and copying files, for example).

    2. We link to a File Contents Automation Task—with no configuration of the task required—to retrieve the contents of the file so that…

    3. We can simply copy the contents of the selected text file to the clipboard.

    In conclusion
    Alfred's File Action Trigger, with its tailored, selective action, is very useful when you want a Universal Action linked to a specific file type (or, indeed, to various specific file types).

    We can stop chewing but some time—in the dim, distant future when the universe has expanded even more—we may again examine file actions in the context of a deconstructed workflow.

    Stephen

    The Simple Ideas posts
  4. Thanks
    sepulchra reacted to Stephen_C in Simple ideas: opening a frequently used folder   
    Background
    Many times a day I open my ~/Downloads folder in various sizes and shapes of window. However, I have a preferred size and shape for that Finder window and, with a very simple Alfred workflow, it's easy not only to cater for that but also to add some useful options.
     
    The skeletal workflow

     
    The explanation
    1, 2 & 3 are all you need for the basic workflow. The remainder are the icing on the…workflow.
     
    I use a Keyword Input because I find it difficult to recall all the hotkeys used in my various apps. Of course, you could use a Hotkey Trigger if you wish. This is a simple Open File Action containing the path to the folder you wish to open. We use an Automation Task to set the bounds of the Finder window exactly was we want them. This is where we are Using Alternative Actions so that ⌥⏎ will take us along the new path in the workflow. Note, in the same Action, we also tell Alfred not to close Alfred's window in order to prevent flickering. (To access the Alternative Actions simply double click the round marker along the connecting line after an input object.) An Automation Task passes the contents of the folder (choosing, in my case, to sort by most recently added) to… Alfred's Grid View—where we can see the contents of the folder displayed in a grid (set to "Keep the results in order defined”). In that view we can search for any item, use ⌘O ("O” for "open”) to open any selected item in its default app or just press ⏎ to move on to action the item in Alfred. Again we keep open Alfred's window (as in 4 above). The Action in Alfred action provides access to Alfred's Universal Actions appropriate to the selected item (allowing you, for example, to delete or move the item, open it in Finder, etc.).  
    In conclusion
    Sorry for the long-winded explanation of a very simple workflow. Once you have it up and running you may, like me, use it many times a day and everything very soon becomes second nature.
     
    Incidentally, there's a splendid workflow from Vitor on the Alfred Gallery called Thumbnail Navigation which allows you to navigate the file system with previews…so you may never need anything similar to what I've described here. But you don't learn as much using other's workflows as you do when writing your own, do you? 😉
     
    Stephen
  5. Like
    sepulchra reacted to vitor in Where’s the Binary — Get the full path to executables in your PATH   
    Usage

    Search for executables in PATH via the whereis keyword.


    ↩ Copy original path. ⌥↩ Copy resolved path if original is a symbolic link.
    ⤓ Install on the Alfred Gallery | Source
  6. Haha
    sepulchra reacted to Stephen_C in An explanation of the "Simple Ideas” posts   
    <Drowning noises off>
     
    I, too, moved from TextExpander the moment it went subscription. But, really, I'd be hard put to abandon Typinator: I have so much in it, including "mini-programs" that Do Things™️.
     
    While my brain is certainly small enough to fit in a Snippet 😁 I have reason to suppose you might be well qualified to prepare some sort of presentation on Snippets. 😉
     
    Stephen
  7. Like
    sepulchra got a reaction from vitor in Integration with Elgato Stream Deck   
    @Crystal Taggart to follow up on what Vitor just posted. I use a stream deck with Alfred often. I call external triggers with this plugin for stream deck:
     
    https://apps.elgato.com/plugins/com.gabrielperales.osascript
     
     
  8. Thanks
    sepulchra reacted to Stephen_C in An explanation of the "Simple Ideas” posts   
    @sepulchra thanks for the ideas…but I think we need to come to some sort of arrangement. You see, I'm a little ashamed to admit that I don't use Snippets (I've used Typinator for years) so I think you should do the ones involving Snippets. 😀
     
    However, I shall adopt Vitor's suggestion for a deconstruction of some of my non-code workflows—and, in doing that, cater for some of the ideas you mentioned. I'll just cover a little more basic stuff first and then, when we have all the building blocks in place, start with some of my basic workflows.
     
    Please feel free to continue to comment (your comments are always valuable) and to contribute anything along the same lines!
     
    Stephen
  9. Thanks
    sepulchra reacted to Stephen_C in Simple ideas: I've got a little list… (1)   
    Background
    This is the first of two posts exploring uses of Alfred's List Filter Input. If you don't know about List Filters do check the link because (a) they are very useful and (b) I shan't cover every aspect of them in these posts.

    This is not intended to be, of itself, a useful workflow but, rather, to show how List Filters may be used.

    The skeletal workflow


    Explanation
    1. The List Filter starts the workflow and shows the keyword used to trigger it (ahp in this case). (If you sometimes see a keyword in italics that is because the keyword has been set in the Workflow Configuration.) Here's what the List Filter looks like when you double click on it:


    Note, at the top of the List Filter, we choose to have the keyword followed by a space and an optional argument. That allows us to see the entire list of items as soon as we type the keyword—and to press space followed by a typed search term to display the item we want. At the bottom right of the List Filter we choose "Alfred learns result order based on usage” so that frequently used items rise to the top of the list as we use the workflow (see Understanding Result Ordering).

    The key thing to note is that each item in the list has two arguments separated only by a comma. The first argument is a URL for an Alfred help page and the second argument is a friendly name for the page. The significance of the second argument will become apparent in the second of these posts.

    2. Because we have two arguments for each item in the list and because for the purposes of this post we're going to use only one we use Alfred's Split Arg Utility to split the two arguments. Here's what it looks like when we double click it:


    We split with a comma (because that's how the arguments in the list are divided) and we output as arguments (because that's what we need in the next part of the workflow).

    3. All we need is the URL (at the moment) so we just use a simple Automation Task to grab the first argument—with no Automation Task configuration needed.

    4. We're home and dry! The URL is passed to the Open URL Action—which we have no need to modify if we wish the URL to open in our default browser.

    In conclusion
    I appreciate none of that is very exciting. However, in the next post we'll start messing around with some simple variables and use both of the arguments in the List Filter. Sadly no popcorn will be served but please remain in your seats.

    Stephen
  10. Like
    sepulchra reacted to vitor in An explanation of the "Simple Ideas” posts   
    Don't worry about it, I’ve only been seeing positive reception! Keep ’em coming!
     
     
    That is so so much the right attitude. Thumbs up.
     
     
    Any of your workflows which is done without code seems like a perfect candidate for a deconstruction.
     
    And here’re a neat trick. A URL for all of your Simple Ideas posts: https://www.alfredforum.com/search/?&q="Simple ideas%3A"&author=Stephen_C&search_and_or=and&search_in=titles&sortby=relevancy
  11. Like
    sepulchra got a reaction from Stephen_C in Simple ideas: opening a frequently used folder   
    Well, i say you keep going and maybe the powers that be might have a simple sub heading for it!
  12. Like
    sepulchra reacted to Stephen_C in Simple ideas: opening a frequently used folder   
    @sepulchra thanks for the kind comment. I'm currently doing a couple more (on List Filters but also covering basic variables in the process). I'm slightly conscious of the fact that some of these are getting rather long (particularly with all the screenshots) and don't want to "bomb" the forum!
     
    I'm unsure what the Powers That Be think of all of this 😁 but currently I'm prefacing the title of each with "Simple ideas:"—with the aim of making them easy to find should anyone wish to do so.
     
    Stephen
     
  13. Like
    sepulchra reacted to vitor in Don't overlook the little, simple things!   
    Here’s a related neat trick. One problem is that sometimes a menu item changes its name depending on something else in the app. For example: in Messages you can see Edit → Tapback Last Message… by default, but if you select a message it changes to Edit → Tapback Message… You can use that difference to your advantage in the workflow to e.g. only make something happen when the right option is available, but sometimes you want activate the menu item regardless of this detail. In this case what you can do is add both as separate Automation Tasks. Because an Automation Task error stops the flow of execution, this means only the active option will get through. You can see this exact example in action in the Tapback Message workflow.
  14. Like
    sepulchra got a reaction from ravage123 in Sonoma replica   
    you might be able to modify this one to get you close to what you are looking for:
     
    https://github.com/ChenNyaru/Spotlight-like-Alfred-Theme
  15. Like
    sepulchra reacted to Vero in We're making videos for Alfred features!   
    I've just published our first two videos about Alfred on YouTube
     
    You can find our videos at https://www.youtube.com/@alfredapptv
     
    Making the time to create more videos about Alfred is exciting, and we'd love your help getting the word out. Share, give it a like, all that good stuff! Thanks for being the best community on the internet!
     
    You can see the ChatGPT / DALL-E workflow in action here:
     
     
     
    And another on using and setting your fallback searches:
     
  16. Like
    sepulchra reacted to vitor in Note Taker — Keep small bits of text   
    Updated to 2024.2.
    Add Universal Action to Edit File. Expand Edit Text universal Action to work on URLs.

  17. Like
    sepulchra reacted to Vero in Alfred 5.5 is now available!   
    Alfred 5.5 Release Candidate is now out with build 2257; We're now one step closer to the general release.
     
    We've tidied up a few more things in preparation for the release, and you've all been doing a great job helping us test it out! Full details are in the change log in the Update tab, as usual.
     
    Cheers,
    Vero
     
     
  18. Like
    sepulchra reacted to dfay in [Alfred 5.5] QuickPad – scratchpad, toggled with one hotkey   
    Is it possible to make it persist and receive text from Alfred's clipboard history / snippet viewer?
    This may need to be a request to @Andrew .... thanks!
  19. Like
    sepulchra got a reaction from Twice Bitten in Alfred 5, Copy Path To Clipboard - Remove Apostrophe (')   
    I think it might be the setting under Features->File Search->Advanced -- There is a Copy Path setting you can uncheck "Escape path on 'Copy Clipboard' action. I think that might do the trick.
     
     
  20. Like
    sepulchra got a reaction from Stephen_C in Alfred 5, Copy Path To Clipboard - Remove Apostrophe (')   
    I think it might be the setting under Features->File Search->Advanced -- There is a Copy Path setting you can uncheck "Escape path on 'Copy Clipboard' action. I think that might do the trick.
     
     
  21. Thanks
    sepulchra reacted to Andrew in beta 5.5 [2247]   
    @sepulchra I've made a further tweak to the undo manager, could you update to b2255 before trying any further.
  22. Thanks
    sepulchra reacted to Andrew in Text View: Configurable Font Size   
    This is now in Alfred 5.5 Beta 2 b2253
     
    Both a Workflow Object scoped option, and a global option (local to you, better if you're going to share the workflow)
  23. Thanks
    sepulchra reacted to Andrew in Text View Spellcheck?   
    This is now in Alfred 5.5 Beta 2 b2253  
  24. Haha
    sepulchra reacted to Andrew in beta 5.5 [2247]   
    @sepulchra Of course... I had a sleep once about 14 years ago, it was great!
  25. Thanks
    sepulchra reacted to Andrew in beta 5.5 [2247]   
    @sepulchra perfect thanks, looks like the undo manager is getting confused. I'll have this fixed in the next release, cheers
×
×
  • Create New...