Emulating piles with folder actions...

Posted:
in macOS edited January 2014
Okay, I ran across BuonRutto's post in the Expose thread here about how Expose is a nice replacement for the 'rummaging' aspect of piles without cluttering up the Finder with any UI element.



Good point.



But... I've been wanting one feature of piles for quite a while now... a workspace launcher. Ie, I'm working on seven or eight different documents in three applications, have a Terminal window open to a particular directory, and I need to shut it all down in a hurry (usually to run for the bus). I'd *love* to be able to say "Save as Workspace" in the Apple Menu, and have it query all open applications for their open documents, compile it all into a list, and save it as a tidbit in the Finder. (Maybe internally it's just a shell script that opens all those docs, for instance.)



All good so far, but it occurred to me that Finder piles would let you add such items in the Finder. That'd be slick. "Oh yeah, tomorrow I need to work on *this* one too... I'll just add it..."



Well, it hit me that Folder Actions allow this. Set up a folder that contains that shell script inside, with a 'On Drop' action that adds a dropped file to that said shell script, then *puts the file back where it was*, and an 'On Open' action that runs the shell script. Slap a neat icon on it, and voila - piles, in a rudimentary form.



Comments?



This is one of the cool things about MacOS X... on the surface, it looks minimalistic, but you start digging and some really neat things start to combine in powerful ways.

Comments

  • Reply 1 of 3
    ast3r3xast3r3x Posts: 5,012member
    thats awesome...not perfect but if i understand that has some useful...well uses





    nice job
  • Reply 2 of 3
    buonrottobuonrotto Posts: 6,368member
    I'm hoping the structure of folder actions and applescripting in Panther changes so that our desire for Finder "smart" folders and/or piles can come true. That is, the script library (hopefully with some sample scripts) will allow you to set criteria for a folder and collect aliases to those items in that folder "live." The solution to piles and smart folders lies somewhere between saved searches and applescripts/folder actions. Seems like scripting, especially if it allows to set rules a la rules in Mail, is extensible enough to cover a lot of ideas for the Finder. And integrating a scripting UI in some ways, like folder actions do in Panther (along with Applscript Studio I assume), could make these things accessible to everyone, not just scripting gurus. But I'm out of my league on the specifics of how this happens. I might be making more of this than what's really possible. It just seems like a good idea to use an extensible structure and existing technology to get the job done in this case.
  • Reply 3 of 3
    hobbeshobbes Posts: 1,252member
    Interesting. Clever too.



    Kickaha, in your RW example... why not just put your computer to sleep? I don't think I've shut down my laptop in months.
Sign In or Register to comment.