Jump to content

peelman

Member
  • Posts

    31
  • Joined

  • Last visited

Posts posted by peelman

  1. So I have a recurring issue of copying new text not working; the couple of scenarios that seem to be repeatable occurences are:

     

    • if you change apps too quickly after copying
    • try to do a copy operation in an application that is _not_ in the foreground
      • say i'm copying a link from Firefox, while Slack is the active app; when I attempt to paste the link, the clipboard still contains the previous contents, not the link as expected).

     

    What I describe there is a bug that isn't Alfred-specific; but as macOS has continued to become the larger, more unwieldy mess that Apple is making it, this particular problem has spread across the system and I now experience it everywhere.  I run no other clipboard manager other than Alfred that would be slowing down the copy time; but the overall problem persists even if Alfred isn't running; and problem #1 exists (but is not consistently present) on a brand new Mac, even between native Apple applications.  which leads me to think the problem is Apple's.

     

    To mitigate this, the one thing I have looked for, but can't find in _any_ Clipboard manager on the market right now, is display a bloody notification when the clipboard changes.  Despite already watching NSPasteboard and reacting to changes, nobody provides the option to send a notification (display a banner, flash an icon, whatever).  I doubt that would be a trivial option to add to Alfred, but I'm at wits end here, and if I'm going to plead with anybody to add something to a tool, Alfred is currently where I'd want it done in my ideal world.  A Workflow input or trigger (though i realize the asterisks that would be potentially attached to that), but even just a check box to "Send notification when clipboard changes" in the History or Advanced Pane of Clipboard History would be amaze-balls.

     

    Thanks Andrew and Vero!

  2. Find Folder

    Download here

     

    Search by folder name.

    Enjoy!!

     

    That doesn't solve what I was going for.  Searching for folders isn't a problem, alfred does a good job of that already.  Its searching non-spotlight indexed folders, just for the file names that it stumbles on.

     

    Again, like a massive media library that lives on a NAS.  Regardless, my solution I posted above has been working well enough that I don't have to care any more.

  3. A few more ideas I had on my most recent work trip:

     

    * Add to Pinboard

    * Add to <bookmark service>

    * Send To...

     

    Using a script or middleman action you could catch ftp:// or vnc:// or ssh:// or randomurlprefix:// URLs and redirect them to programs of your choice.

     

    Isn't the idea of Workflows basically to enable random things like this that perhaps you don't see the use for?  At least until you put them in the hands of the public at large and see what kinds of nifty crap we come up with? :)

  4. Andrew, if I attempt to use a space in my argument, Alfred drops out of the script filter completely.  I.e. if I have a script filter for my TV shows folder (keyword 'tv'), and i type:

     

    tv the daily

     

    when searching for "the daily show", I can't find a way to make that work. I'm just using a rough php preg_match, so I can just do 'tv daily' and that finds it ok, but at this point my curiosity is piqued, so i want to see if its by design that you can't use arguments with spaces, or if there's something afoot here...

  5. So one of my peeves with Alfred and one of the edges I felt Quicksilver held against it was the ability to index just a folder, recursively to a defined level, and search those results.  I keep all my media out on a NAS and having spotlight index those volumes just doesn't bode well for any of the involved parties, so I could never use Alfred quite like I could Quicksilver for quickly finding a TV show or Movie out on my file server.  Thanks to script filters and some of jdfwarrior's great scripting hints, that's no longer true:

     

    require_once('extension_utils.php'); 
    $utils = new ExtensionUtils();
    
    $query = urlencode( "{query}" );
    $results = array();
    
    $pattern = "/$query/i";
    
    $dir = "/Volumes/video/movies";
    
    if (is_dir($dir)) {
        if ($dh = opendir($dir)) {
            while (($file = readdir($dh)) !== false) {
    	        if ($file != "." && $file != ".."  && ($query && preg_match($pattern, $file))) {
    
    				switch(pathinfo("$dir/$file", PATHINFO_EXTENSION)):
    					case 'mkv': $icon = 'MKV.png'; break;
    					case 'avi': $icon = 'AVI.png'; break;
    					case 'm4v': 
    					case 'mp4': $icon = 'M4V.png'; break;
    					default: $icon = 'movie.png'; break;
    				endswitch;				
    
    				$item = array(
    					'uid' => 'show',
    					'arg' => "$dir/$file",
    					'title' => $file,
    					'subtitle' => "$dir/$file",
    					'icon' => $icon,
    					'valid' => 'true'
    				);
    				array_push( $results, $item );
    			}
            }
    		closedir($dh);
        }
    }
    
    echo $utils->arrayToXml( $results );
    

     

     

     

    There's no good way (yet) to make this easily configurable, so posting it out as a full workflow for download seems a bit silly at this point, but perhaps this code might help somebody along the way achieve what they need.

×
×
  • Create New...