Jump to content

ctwise

Member
  • Posts

    307
  • Joined

  • Last visited

  • Days Won

    23

Posts posted by ctwise

  1. First off, a compliment on how awesome Alfred is in general, but... I have a devil of a time making good use of Alfred's File Search. Maybe it's just me, but it doesn't seem to do what it _should_ do, make working with files fast and easy.

     

    1. When actioning files, you press right arrow to display the actions, but to back out of the action, you have to press _escape_. Pressing the 'left arrow' should back you out of the options to the previous display.

     

    2. When you enter a tilde (~) as the beginning of a path, Alfred automatically expands it to the home directory path and appends a path separator. This throws me off, Every. Single. Time. I know Alfred will ignore two path separators in a row but I would be much happier if Alfred simply didn't expand the tilde.

     

    3. When selecting files in Alfred, you often filter them, e.g., ~/Downloads/*.txt. But if you immediately action the list you get just the first file. I get that the wildcard isn't really a file specification, it's a search filter, but it would work much better if actioning on a wildcard automatically added all files to the buffer. Failing that, a worse option would be a key chord that added all the displayed files to the buffer (instead of option-down arrow over and over and over...).

     

    4. Some reminder on key chords would be very useful in the right pane of the file list. It always takes me a second to remember what does what.

     

    5. The Return/Enter key browses into folders but it _opens_ documents. The Tab key browses into folders but does _nothing_ for documents (though the Tab key can be enabled in preferences). It feels like a lack of consistency.

     

    6. There are _five_ different keywords to use Spotlight to find files:

     

    <quicksearch> (using ' or space) - Does a filename search in Spotlight

    open - Seems the same as the quicksearch

    find - Does a filename search in Spotlight but pressing enter on the filename reveals it in Finder

    in - Does a content search in Spotlight

    tags - Does a tags search in Spotlight

     

    This feels like a hot mess. Firstly, it's missing the most useful option, a search that supports Spotlight syntax, e.g., name:, tag:, etc. The 'find' keyword is superfluous since not only is there an action to reveal in finder, you can hold down command when pressing enter to get the same effect. At minimum I would like to see the quicksearch take the full Spotlight syntax.

     

    7. Where appropriate, actions should accept "normal" key chords, e.g., the Delete action should be triggered by the 'delete' key, not just option-8.

     

    Hopefully the File Search functionality is going to get a major facelift in an upcoming release and I can start making better use of the File Search feature.

  2. Funnel takes text and converts it to some other text by running it through a filter. The filter can be a shell script one-liner or a full script. Anything that takes standard input and outputs to standard out. At the moment, the following filters are implemented:

     

    - Base64 - decode
    - Base64 - encode
    - AES-256 - decrypt with passphrase 'X'
    - AES-256 - encrypt with passphrase 'X'
    - x509 - fingerprint
    - x509 - hash
    - x509 - certificate information
    - Change case - lowercase
    - Change case - uppercase
    - Change case - capitalize
    - Change case - title case
    - JSON - format
    - String - reverse
    - String - format US phone number
    - Lines - clear bullets
    - Lines - sorted unique lines
    - Lines - number lines
    - Lines - bulletize
    - Lines - top 10 unique lines
    - Lines - remove blanks
    - Lines - unique lines only
    - Lines - doublespace
    - Markdown - convert search links to normal links
    - Markdown - convert to HTML
    - URL - encode
    - HTML - encode
    - Sort IPv4 addresses

     

    The Funnel workflow is a variant of the preexisting Pipe workflow (http://www.alfredforum.com/topic/1187-filter-clipboard-through-your-favourite-one-liners). I wasn't happy with how the workflow presented options and I didn't want the options sorted by Alfred. I also wanted to bundle some heavier processing scripts, so I created my own version of the workflow from scratch.

     

    The workflow can operate on text on the clipboard, on a file whose filename is on the clipboard, on selected text (using a hotkey) or on a selected file (using a hotkey). No matter where the text comes from, it is piped through the selected filter. If the text came from the clipboard or a selection, it is pasted into the active application after being processed. If the text came from a file, the file contents are replaced with the processed text.

     

    So, for example, if you select a block of text and trigger the workflow with a hotkey, you can choose 'Lines - bulletize' and the selected text will be replaced with bulleted lines. If you select a JSON file in Finder (or Path Finder) and trigger the file hotkey, you can choose 'JSON - format' and the file contents will be replaced with formatted JSON.

     

    Update: As Vitor pointed out, I forgot the link :-) https://github.com/packal/repository/raw/master/com.tedwise.funnel/funnel.alfredworkflow

  3. Andrew has been doing a great job fixing defects and he's probably got a big new release in development. Hopefully it's not too late to bring back up old feature requests and throw in a few new ones. So here's my personal pain list.

     

    Interface Changes
     

    1. Support images in clipboard history

    2. Support full Spotlight syntax in searches, e.g., tag:tagname name:xyz

    3. Assigned keystrokes, e.g., control-m for move, for command file operations in addition to command-1, command-2, etc.

    4. Display keystroke hints for multi-file select (I can never remember them)

    5. Make clipboard merging less fussy. I had to turn it off because it triggered constantly when I didn't want it to.

    6. Copy workflows

    7. Add all displayed files to the file buffer (http://www.alfredforum.com/topic/2296-add-all-files-to-the-buffer/)

    8. Email compressed versions of files (http://www.alfredforum.com/topic/1173-email-compressed/)

    9. Allow file actions to perform complex checks to make sure they're applicable to the selected file (http://www.alfredforum.com/topic/779-add-additional-filtering-to-file-actions/)

     
    Workflow Changes
     
    1. Support debugging and/or show errors/intermediate results
    2. File path completion when workflows call for filename inputs (and yes, I'm aware I could _also_ make them file actions) (http://www.alfredforum.com/topic/728-shell-command-line-completion-for-shell-commands/)
    4. Add a contact results type to workflows so a workflow can return not just generic results or filename results but also contact results (http://www.alfredforum.com/topic/2884-return-contacts-from-a-workflow/). So, for example, an LDAP search workflow could return contacts.
    5. Allow filter stages to pass multiple results instead of having to concatenate results in query and parse them back out again. See Pipe Dream #4.
    7. Provide initial query to all stages of the workflow (http://www.alfredforum.com/topic/412-provide-original-query/)
     
    Pipe Dream
     
    1. TextExpander-like workflow triggers
    2. TextExpander-like snippet expansion
    3. Add Keyboard Maestro functionality
    4. Switch from XML to JSON both for result lists and for complex result values.
     
    In general, I'd love to subsume the complete functionality for Keyboard Maestro and TextExpander into Alfred.
     
  4. It looks like there's a second file - ~/Library/SyncedPreferences/com.apple.finder.plist - that has a list of all of the "pure" tags, e.g., not a label that acts like a faux tag. Unfortunately, this list is only updated by Finder when you assign a tag to a file through Finder. If you tag a file and never interact with it through Finder then the tag doesn't show up in this file. Still, if you merge the contents of both preferences lists you'll get closer to a comprehensive tag list.

  5. Here's something you can experiment with.

     

    - Use Homebrew to install 'tag' (https://github.com/jdberry/tag/).

    - Create a test file and tag it with a tag that's not in use on your system.

    - Create another test file and go to Finder. Bring up the info view and click in the tags area. If you start to type the name of your test tag, it'll autocomplete. Finder knows about it.

    - Look in the com.apple.finder.plist. The tag isn't in there.

     

    So _something_ is monitoring tags and keeping a running list of tags used on the system. It might be just in memory but I don't think so, because the list survives restarts. It might be just in Finder, it might be an unpublished system call. 

     

    Curious.

  6. This uses the view settings of the tags shown by "All Tags" in Finder. Not sure if there is a "critical mass" that stops Finder from storing the tags in its prefs. Haven't found any other way until now. Suggestions are welcome.

     

    I wish I had a suggestion as well. :-) I was looking for exactly this a while back and the only reliable way I found was to brute force it, extracting tags out of every tagged file then collating the results. Obviously Finder has a way to get that list, so somebody needs to trace Finder and see where it's pulling that list from.

  7. So it never runs 2 threads at once? Then it sounds impossible to accomplish this functionality (only run the "real" one when the user has stopped typing). But I remember debugging a script filter once and seeing multiple instances of it running at once...

     

    I don't really need to force one to run. But if there are several running at the same time, it's easy to determine which is the most recent and abort all the other ones, thus making the whole thing smoother and faster.

     

    I don't really think it makes sense to wait for a script to return if there is already another query typed in, no?

     

    The only robust solution to this (until/unless support is directly added to Alfred) is to kick off a daemon process that does the work and returns results. Then your script communicates with the daemon and returns immediately if no results are available. In the daemon you can throttle the lookups. Of course, there's the issue that Alfred waits for child processes kicked off by scripts so your daemon will have to work around that. :-)

  8. Adobe does weird crap with their menus. They appear to use non-standard mechanisms to display their menus so the displayed menu items don't necessarily match the extracted menu items and they don't trigger correctly with AppleScript.

  9. Since updating to VMWare Fusion 6 and using this App with "Start Virtual Machine" the Workflow does not only open the selected VM also it opens the Library.

    When I use the VMWare Icon in the Statusbar and select the machine it only opens the machine, not the library.

    Does this workflow now maybe also need an update because of VMWare 6 ??

     

    Thanks in advance for your reply and maybe updating the Workflow. :)

     

    Probably needs updating. I wasn't planning on upgrading to VMF 6 just yet, it doesn't have any features I've been waiting for.

  10. I don't think it is if Spotlight doesn't index those contacts as well. Alfred searches using metadata created by Spotlight's metadata server so, if Spotlight can't find it, neither can Alfred. It may be possible with a workflow but I have no way of testing or trying this to find out.

     

    I was under the impression that Alfred 2 switched from using Spotlight to using the contacts API for contacts access. I have no idea if that API provides LDAP/Exchange access though.

  11. It's Unix.

     

    - kill asks an app to terminate. An app is free to ignore the request and/or be hung up so badly it can't quit.

    - kill -9 forces an app to terminate, works on hung apps. A forced termination will skip any pending disk writes, etc., that an app might do if quit "nicely"

    - kill -HUP sends the "hang-up" signal to tell an app to restart. Some apps watch for this and reload their configuration, e.g., the Apache server.

     

    Ted, 

     

    Could you elaborate on the differences between "kill -9", "kill -HUP" and "kill". 

     

    Thanks.

  12. Whoa, how did I manage to miss this?! Very well done, dear, I'm duly impressed! Would love to get a look at the Objective-C, if you've a mind to stick it on Github.

     

    Also, I'm gonna be a feature freak and ask: Since it looks like the workflow collects shortcut keys, is there any way to show them in its feedback? It'd be a boon for memorizing more esoteric Sublime key-combos.

     

    It's already on Github. The shortcut keys can't be reliably extracted, hence the lack of display. The applications that display shortcut keys for applications exhibit similar problems, which is why at least one of them let you download custom shortcut lists. I believe the shortcut extraction can be improved slightly based on the results from the proprietary apps but I'm not sure how they're doing it.

×
×
  • Create New...