TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Hazel for hackers

64 pointsby nicoritschelover 12 years ago

10 comments

icebrainingover 12 years ago
Is there a great advantage over standard shell commands, besides being in Ruby? For example, the following rule:<p><pre><code> rule 'Trash old temporary files' do dir('~/Outbox/*.tmp.*').each do |p| trash(p) if 1.week.since?(modified_at(p)) end end </code></pre> can be replaced with:<p><pre><code> #Trash old temporary files find ~/Outbox/ -iname '*.tmp.*' -mtime +7 -exec mv {} ~/.Trash \; </code></pre> The maid script may be more readable if you don't know 'find', but on the other hand, this has only one line.
评论 #4930116 未加载
flogicover 12 years ago
One of the areas where I disembark from the traditional Unix way is to replace "--dry-run" like flags with "--enable-destruction". That way I have to intentionally do the bad thing.
评论 #4929259 未加载
zdwover 12 years ago
A nice feature that could be implemented on OS X would be to auto-organize files by the domain they're downloaded from.<p>Safari on OS X puts the source link of a downloaded file in the spotlight metadata, which can be accessed via "mdls" - an excerpt:<p><pre><code> $ mdls Inconsolata-Bold.ttf -- other metadata -- kMDItemWhereFroms = ( "http://googlefontdirectory.googlecode.com/hg/ofl/inconsolata/Inconsolata-Bold.ttf, "http://code.google.com/p/googlefontdirectory/source/browse/ofl/inconsolata/Inconsolata-Bold.ttf ) </code></pre> Personally, I'd find that much more useful than the "all pdf's are books" example.
评论 #4929140 未加载
mr337over 12 years ago
Something that I recently started to do that seemed to help me it to point downloads of FF and Chrome to /tmp. So if I downloaded something important I immediately moved it to where it belonged.<p>On reboot all the stuff you didn't care about is gone.
andrethegiantover 12 years ago
I like it, but prefer something like guard-shell which is event-driven: <a href="https://github.com/guard/guard-shell" rel="nofollow">https://github.com/guard/guard-shell</a>
评论 #4930241 未加载
Xyzodiacover 12 years ago
I've been meaning to try maid, I installed the gem but I've yet to do anything more. Thanks for posting this, as now I have some incentive to configure it.
aes256over 12 years ago
This looks interesting. I've been using Hazel on OS X for a long time.<p>Will have to give it a try...
stratosvoukelover 12 years ago
It looks great! yay! Now lets make something to take care of our rooms! :P
评论 #4930242 未加载
terhechteover 12 years ago
Would be great to have a repository with rules for this.
评论 #4928899 未加载
drivebyacct2over 12 years ago
This is pretty much horrifying (to someone like me who likes to meticulously manage and know where things are instead of treating "Downloads" or "Desktop" like a flat-filesystem.<p>Is it really that hard to just, you know, delete a few files whenever you download something? Download X. Okay. Download Y, go to open Y, delete X while you're there.<p>Somehow I have 6 TB of data and it's all organized. I don't have any files on my Desktop or Downloads folder. Amazingly, I don't have to spend 4 minutes looking for something when I need to pull something up to look at it or send to a friend.
评论 #4930012 未加载
评论 #4930325 未加载
评论 #4930886 未加载