05/02/11 19:44:25

Alfred tip: Create new text files fast

Sometimes I need a quick way to create a new text file with text that is on my keyboard. I used to use a script for LaunchBar, which I can run from Keyboard Maestro as well.
The quickest solution, that also removes all formatting, I could come up with was this:

pbpaste > ~/Desktop/new_textfile.txt

But here’s the thing: Do you have Alfred (with Powerpack) installed? Then do this:

  1. ⌘⌴ (My shortcut for Alfred)
  2. ⌘, (preferences)
  3. Features → Terminal/Shell
  4. Click the little plus icon:
    • Title: Paste clipboard to desktop
    • Description: Creates a new (plain text) file on desktop from clipboard contents.
    • Keyword: pastedesk
    • Command: pbpaste > ~/Desktop/{query}.txt

{query} is optional, but gives you the option to even set the filenames’ name.

This is so great, that I even made a ugly little icon with Skitch and Acorn for it! (Not that I intend to do a screencast of one those apps in the near(er) future!)

For black themes:

For white themes:

(Of course I have black theme. Green font on black background to be exact. I wanted to have at least one program with this kind of color setting.)