Let The Maid Clean Up Your Desktop

by Ostatic Staff - Jun. 03, 2013

Hazel is a fantastic application that automates the task of managing files on a Mac. After moving to Linux, I nearly forgot about this essential task, and was stuck filing documents on my own. Luckily, a great new project named Maid by Benjamin Oakes is stepping up to fit the final piece of Linux desktop automation puzzle. Maid bills itself as “Hazel for hackers”, and while it is not nearly as refined as Hazel, if don’t mind learning a little Ruby, Maid can significantly increase your productivity.

Maid keeps files from sitting around too long, untouched. Many of the downloads and temporary files you collect can easily be categorized and handled appropriately by rules you define. Let the maid in your computer take care of the easy stuff, so you can spend more of your time on what matters.

In the OS X world, I had a paperless workflow that let me file away important PDF documents automatically by defining rules in Hazel and dropping an OCR’d PDF document in a monitored folder. Making sure the PDF had recognizable text was important, because Hazels rules were set up to make decisions based on the text of the PDF. For example, if the PDF has the words “MidAmerican Energy”, and the string of text that matches my account number, I know that it is my monthly power bill and needs to be renamed and moved into the appropriate folder. While Maid doesn’t fit this workflow out of the box, since the rule sets are ruby source code, they should be extensible enough to replicate.

For example, I’m currently writing a rules file that imports PDF::Reader, and should be able to parse the text of a PDF file and make the appropriate decision.

Maid rounds off my Linux desktop productivity trio, alongside Kupfer and AutoKey. Using these three tools, along with my trusty text editor Vim, mean that I hardly ever need to take my hands off the keyboard, that my PC is clean and organized, and that I can accomplish nearly any task without needing to stop to think about how I’m going to do it. When I download a file, the Maid takes care of moving it where it needs to go. When I’ve compiled a few LaTeX documents, the Maid comes in afterwards and cleans up the mess, leaving only the PDF and raw LaTeX source (and style files, if they are there).

Maid is a great utility, and I’m hoping to see more enhancements in future development. A daemon mode would be welcome, although Cron works just as well. It would also be nice if there were a standard way for Maid to parse the contents of files without hacking on additions. If I can get the pdf parsing to work reliably, I’ll share my work. If you have some clever rules to share, I’d love to hear about them. Let me know in the comments!