Macintosh

You are currently browsing articles tagged Macintosh.

I don’t think that it is any secret that I’ve become a big fan of Markdown (MultiMarkdown to be precise; more on that in a moment) over the last couple of years. Likewise, it’s not really a secret that I’m an OS X user, although my “fanboi” status for OS X has waned a bit since the introduction of Lion and Mountain Lion (neither of which are as good, in my opinion, as Snow Leopard, but that’s an entirely different discussion—the jury is still out on Mavericks). In this post, I want to share with you a few Markdown tools for OS X that I’ve been using and that (hopefully) you’ll find helpful as well.

BBEdit

Because Markdown is just plain text, a good text editor is essential. For a long time, I was a diehard TextMate fan. It was lean, it was fast, and the syntax highlighting for Markdown was really good. Over time, though, as TextMate faded and waned, I found myself in a position of needing to find a new text editor. (Yes, I looked at the TextMate 2.0 alpha releases. I didn’t really like where the project was headed, though I’m sure that it’s perfectly fine for many folks.) I played with a variety of text editors, and finally settled on BBEdit, from Bare Bones Software.

One of the key things that attracted me to BBEdit was its extensibility. (This included fairly extensive AppleScript support.) For example, once I’d wrapped my head around how BBEdit works (which meant unwrapping my head from how TextMate worked), it was relatively trivial to incorporate additional AppleScripts and even UNIX scripts into my workflow (here’s a non-Markdown example). I’m still uncovering tips and tricks for maximizing my use of BBEdit, but if you’re in the market for a good text editor to use with Markdown, I’d recommend giving BBEdit a serious look.

MultiMarkdown

It didn’t take me too long to stop relying on built-in Markdown processors in my text editors and switch to the standalone MultiMarkdown processor from MultiMarkdown’s creator, Fletcher Penny. In addition to a few syntax additions, MultiMarkdown (MMD) adds more output options—not just HTML, but also OPML and ODF. (ODF can then be easily transformed into RTF or DOC/DOCX using a built-in tool from OS X named textutil.)

Because of BBEdit’s extensibility—specifically, because of the ability to integrate UNIX scripts into the application—it was a piece of cake to use BBEdit for writing the Markdown, then leverage the standalone MMD processor to convert to the final output format.

One other thing I really like about MultiMarkdown is the ability to add metadata to the document. This allows you to embed keywords, author name, document title, project, affiliation, dates, etc., into the document itself. This has two benefits:

  1. It makes it easier to find the right original documents, since each document now carries additional information that you can use in Spotlight.
  2. When converting to HTML, this information gets embedded into the HTML header.

To make embedding the Markdown metadata easier, I use a Typinator snippet.

QuickLook Generator

Available here, this QuickLook generator allows you to preview Markdown/MultiMarkdown files using OS X’s QuickLook functionality. This might not seem like a big deal, but I’ve actually found it quite useful.

Pandoc

Pandoc, from John McFarlane, is a treasure trove of document conversion functionality. It supports an impressive list of both input and output formats. While the standalone MultiMarkdown processor handles most of what I need, having Pandoc in my pocket when I need some additional conversion options is very powerful. For example, I can (and sometimes do) use Pandoc to handle automatic conversions from Markdown/MultiMarkdown directly to Rich Text Format (RTF) or DOC/DOCX. Pandoc also allows you to specify custom templates, so that you could create custom RTF templates that would control how the final RTF document is formatted. All in all, a very powerful tool.

Marked

Marked is a relatively new addition to my Markdown toolset, although it’s been around for a while. The premise behind Marked is simple: preview any Markdown (or MultiMarkdown) document. It turns out this functionality is quite useful (more so than I thought it would be, to be honest). Brett Terpstra, the developer behind Marked, has added features like readability statistics, keyword highlighting, and repetitive word visualization to make Marked even more useful. Another feature I’m finding very handy is the ability to easily export from Marked in PDF, something that is possible using other tools but not nearly as easy. Now, if only I could control Marked via AppleScript, so I could automate that process…that would be ideal.

I hope this information is useful to someone. I’ve found that using Markdown via some of these tools has really helped my productivity; perhaps you will find the same thing. As always, feel free to post any courteous comments, corrections, or clarifications below.

Tags: , ,

Technology and Travel

Cody Bunch recently posted a quick round-up of what he carries when traveling, and just for fun I thought I’d do the same. Like Cody, I don’t know that I would consider myself a road warrior, but I have traveled a pretty fair amount. Here’s what I’m currently carrying when I hit the road:

  • Light laptop and tablet: After years of carrying around a 15″ MacBook Pro, then going down to a 13″ MacBook Pro, I have to say I’m pretty happy with the 13" MacBook Air that I’m carrying now. Weight really does make a difference. I’m still toting the full-size iPad, but will probably switch to an iPad mini later in the year to save a bit more weight.
  • Bag: I settled on the Timbuktu Commute messenger bag (see my write-up) and I’m quite pleased with it. A good bag makes a big difference when you’re mobile.
  • Backup battery: I’m carrying the NewTrent PowerPak 10.0 (NT100H). It may not be the best product out there, but it’s worked pretty well for me. It’s not too heavy and not too big, and will charge both phones and tablets.
  • Noise-canceling earphones: The Bose QC20 earphones (in-ear) are awesome. Naturally they let in a bit more noise than the bigger on-ear QC15 headphones, but the added noise is worth the tremendous decrease in size and weight.

On the software side, I’ll definitely echo Cody’s recommendation of Little Snitch; it’s a excellent product that I’ve used for years. You might also consider enabling the built-in firewall (see this write-up for enabling pf on OS X Mountain Lion; haven’t tried on Mavericks yet) for an added layer of network protection.

What about you, other road warriors out there? What are you carrying these days?

Update: Thanks to Ivan Pepelnjak, who pointed out that I had inadvertently swapped out the product names for the Bose earphones and headphones. That’s been corrected!

Tags: , ,

In this post, I’m going to show you a workaround to running Synergy on OS X Mavericks. If you visit the official Synergy page, you’ll note that the site indicates that full Mavericks support is still pending. However, if you’re willing to “get your hands dirty,” you can run Synergy on OS X Mavericks right now.

If you’re unfamiliar with Synergy, read this write-up (from 2 years ago) on how I use Synergy in my home office setup. The basic gist behind Synergy is that one computer will run the Synergy server; other computers will run the Synergy client and connect to the Synergy server. You’ll be able to use the keyboard and mouse attached to the Synergy server to control the Synergy clients.

Here’s how to get Synergy support running on OS X Mavericks now:

  1. Download the latest 10.8 Synergy build from the website. (I didn’t include a link here because the link changes as the version changes, so the link would become stale rather quickly.) This downloads as a .DMG file to your computer.
  2. Double-click the .DMG to open and mount it on your desktop. Inside the .DMG, you’ll see the Synergy app icon.
  3. Right-click (or Ctrl-click) on the Synergy app and select “Show Package Contents.”
  4. Double-click on Contents, then MacOS.
  5. In the MacOS file, copy the synergys and synergyc files to a different location. It doesn’t really matter where, just make note of the location.
  6. Close all the window and eject (unmount) the downloaded .DMG file.

For your Synergy server, you’ll need an appropriate configuration file. You can check my previously-mentioned Synergy post for an example configuration file, or you can peruse the official wiki. Either way, create an appropriate configuration file, and make note of its name and location.

When you’re ready, just launch the Synergy server from the OS X Terminal, like this (I’m assuming that synergys and its configuration file—creatively named synergy.conf—are stored in your home directory):

~/synergys -c ~/synergy.conf

Using whatever method you prefer, copy the previously-extracted synergyc file to your Synergy client(s). As before, it doesn’t really matter too much where you put the file, just make a note of the location. Then, using the OS X Terminal, run this (as before, I’m assuming synergyc is in your home directory):

~/synergyc <Name of Synergy server>

That’s it! You should now be able to use the keyboard and mouse on the Synergy server to control the Synergy client. I can verify that current builds of the Synergy client (synergyc) work just fine on OS X Mavericks, and I would imagine that the Synergy server would work fine as well (I just haven’t had time to test it). If anyone has tested it and would like to provide feedback in the comments, I’m sure other readers would appreciate it.

Enjoy! (By the way, if you do find Synergy to be useful, I’d recommend donating to the project.)

Tags: , ,

I’m back with another “Reducing the Friction” blog post, this time to talk about training an e-mail spam filter. As you may recall if you read one of the earlier posts (may I suggest this one and this one?), I use the phrase “reducing the friction” to talk about streamlining and simplifying commonly-performed tasks so as to allow you to improve your own personal efficiency and/or adopt more efficient habits or workflows.

I recently moved my e-mail services off Google and onto Fastmail. (I described the reasons why I made this move in this post.) Fastmail has been great—I find their e-mail service to be much faster than what I was seeing with Google. The one drawback, though, has been an increase in spam. Not a huge increase, mind you, but enough to notice. Fastmail recommends that you help train your personal spam filter by moving messages into a folder you designate, and then telling their systems to consider everything in that folder to be spam. While that’s not hard, it’s also not very streamlined, so I took up the task of making it even easier and faster.

(Note that, as a Mac user, most of my tips focus on Mac applications. If you’re a user of another platform, I do apologize—but I can only speak about what I use myself.)

To help make this easier, I came up with this bit of AppleScript:

(Click here if you don’t see a code block above this paragraph.)

To make this work on your system, all you need to do is just change the two property declarations at the top. Set them to the correct values for your system.

As you can tell by the comments in the code, this script was designed to be run from within Apple’s Mail app itself. To make that easy, I use a fantastic tool called FastScripts (highly recommended!). Using FastScripts, I can easily designate an application-specific shortcut key (I use Ctrl-Cmd-S) to invoke the script from within Apple Mail. Boom! Just like that, you now have a super-easy way to both help speed up processing your e-mail as well as helping train your personal spam filter. (Note: if you are also a FastMail customer, refer to the FastMail help screens while logged in to get more details on marking a folder for spam learning.)

I hope this helps someone out there!

Tags: , , ,

In this post I’m going to show you how to make JSON (JavaScript Object Notation) output more readable using a BBEdit Text Filter. This post comes out of some recent work I’ve done in learning how to interact with various REST APIs. My initial REST API explorations have focused on the NVP/NSX API, but I plan to soon expand my explorations to include other APIs, like OpenStack.

<aside>You might be wondering why I’m exploring REST APIs and stuff like JSON. I believe that having a better understanding of the APIs these products use will help drive a deeper and more complete understanding of the underlying products. I could be wrong…time will tell.</aside>

BBEdit Text Filters, as you may already know, simply take the current text (or selected text) in BBEdit, do something to it, and then output the result. The “do something to it” is, of course, the magic. You can, for example—and this something that I do—use the MultiMarkdown command-line executable to transform a (Multi)Markdown document in BBEdit to HTML. All that is required is to place the script (or a link to the script) in the ~/Library/Application Support/BBEdit/Text Filters directory. The script just needs to accept input on STDIN, transform it in whatever way you want, and spit out the results on STDOUT. BBEdit does the rest.

In this case, you’re going to use an extremely simple Bash shell script containing a single Python command to transform JSON-serialized output into a more human-readable format.

First, let’s take a look at some JSON-serialized output. Here’s the output from an API call to NVP/NSX to list the logical switches:

(To view the information if the code block isn’t available, click here.)

It is human-readable, but just barely. How can we make this a bit easier for humans to read and parse? Well, it turns out that OS X (and probably most recent flavors of Linux) come with a version of Python pre-installed, and the pre-installed version of Python comes with the ability to “prettify” (make more human readable) JSON text. (In the case of OS X 10.8 “Mountain Lion”, the pre-installed version of Python is version 2.7.2.) With grateful thanks to the folks on Twitter who introduced me to this trick, the command you would use in this instance is as follows:

python -m json.tool

Very simple, right? To turn this into a BBEdit Text Filter, we need only wrap this into a very simple shell script, such as this:

(If you aren’t able to see the code block above, please click here.)

Place this script (or a link to this script) in the ~/Library/Application Support/BBEdit/Text Filters directory, restart BBEdit, and you should be good to go. Now you can copy and paste the output from an API call like the output above, run it through this text filter, and get output that looks like this:

(Click here if the code block above isn’t visible.)

Given that I’m new to a lot of this stuff, I’m sure that I have probably overlooked something along the way. There might be better and/or more efficient ways of handling this, or better tools to use. If you have any suggestions on how to improve any of this—or just suggestions on how I might do better in my API explorations—feel free to speak out in the comments below.

Tags: , , , , ,

Among IT pros, it’s quite common these days to have a home lab/home network complete with DNS, DHCP, hypervisors, storage, etc. As IT pros, it’s also quite common to have to use a virtual private network (VPN) solution to connect back to our employers’ corporate networks in order to get work done. In this post, I’ll show you how you can reconcile these two (sometimes conflicting) situations with a relatively little-known feature in OS X. (This post builds upon an article on this same feature that I published in 2006.)

Like many other IT pros, I have my own home network, and I use a custom domain name for that home network. Since this custom domain name doesn’t exist outside my home network, I also have DNS servers on the home network, and I configure the systems on my home network to use these internal DNS servers via DHCP (or static assignment). No big deal, right?

It’s not a big deal until it comes time to connect to the corporate network via VPN. Like many other corporate VPN solutions, my employer’s VPN solution changes the DNS configuration on systems that connect so that these remote systems perform DNS queries via the corporate DNS servers. This is what allows access to the usual server.internal.dept.company.com systems, whether those are wikis, web portals, expense reporting systems, or whatever else. Clearly this is a necessary piece, as without being able to resolve internal corporate DNS queries we’d be unable to access the systems we need to access. The unfortunate drawback is that it breaks the home DNS configuration—which means now you (typically) lose access to internal home systems.

Fortunately for OS X users, there is a workaround. (This workaround might also work for Linux and other BSD-derived systems; I haven’t tested it there yet. I don’t know of any similar functionality for Windows.)

The workaround involves taking advantage of what is known as multi-client support in the OS X resolver. (See this online copy of the resolver (5) man page for more details.) Basically, what this means is that you have the ability to create domain-specific DNS configurations. So, you could have a “default” DNS configuration—this would be stored in /etc/resolv.conf and maintained automatically by OS X via changes in the Network panel of the System Preferences tool—as well as a series of domain-specific DNS configurations. When the DNS resolver client needs to resolve a name to an IP address, it will consult the hierarchy of domain-specific configurations, falling back to the default configuration if it doesn’t find any matches.

Let’s take a look at a specific example, and I’ll walk you through how to configure your OS X system. For the purposes of this example, I’ll assume that your internal home domain name is homedomain.net. As you work through these configuration steps, substitute the correct domain name as needed.

  1. Open a terminal (I use iTerm 2).

  2. If your everyday user account isn’t an administrative user (mine isn’t), then use the su command to switch to an administrative user. For example, if your administrative user was named george, then you’d use su - george and supply the correct password for that account.

  3. Create the right directory structure with the command sudo mkdir /etc/resolver. You’ll be prompted for the password of the administrative user again. This directory structure is hard-coded into the DNS resolver client, so be sure to name the directory resolver and ensure that it is in the /etc directory.

  4. Create the resolver configuration for your domain name using the command sudo touch /etc/resolver/homedomain.net. The name of the file has to match your internal domain name, so modify it accordingly. If you ran the previous command within a couple of minutes of running this one, you won’t be prompted for the password again.

  5. Edit the resolver configuration with sudo vi /etc/resolver/homedomain.net. (No vi versus nano arguments here, please. Use the tool you prefer.) You’ll want to make the domain-specific configuration file look something like this (substituting the correct domain name and DNS server IP addresses, of course):

domain homedomain.net
nameserver 192.168.1.10
nameserver 192.168.1.11
  1. Save the domain-specific file and exit the editor, log out of the administrative user account, and (optionally) close your terminal window. (Personally, I almost always have a terminal window open anyway.) That’s it—you’re done!

You can test this by logging into your corporate VPN. You’ll note that once you’ve logged into your corporate VPN, the values inside /etc/resolv.conf—which is the “default” DNS resolver configuration used when no domain-specific configuration file is found—will have been modified to use corporate values. However, the domain-specific file in /etc/resolver (whose filename matches your internal domain name—you did make sure of that, right?) will remain unchanged, and that’s the configuration OS X will use when attempting to resolve fully-qualified domain names in your home domain. Go ahead, try it. Pretty cool, eh?

I use this configuration myself, and I haven’t run into any problems with it. The one drawback I see is that the domain-specific configuration file is hard-coded, not managed by DHCP, so that could present some additional configuration overhead should the IP addresses of your internal DNS servers change. However, I think that is a reasonable trade-off for being able to easily access home network resources while connected to my corporate VPN.

Questions? Comments? Clarifications? Feel free to post them in the comments below, where courteous comments are not only welcome, but encouraged.

Tags: , ,

A few weeks ago I published a Reducing the Friction blog post centered on helping to streamline the tasks involved in processing e-mail. (Recall that there is a distinction between managing e-mail and processing e-mail.) In this Reducing the Friction post, I’d like to revisit the idea of processing e-mail with a slightly different take: using text expanders to streamline composing and replying to e-mail messages.

As much as we all love to bash e-mail as a productivity killer, it has become something of a necessary evil in most professional environments. As such, we’re better off (in my opinion) reducing the time and effort it takes to deal with this necessary evil so that we can get on to bigger and better things. The use of text expanders—tools like TextExpander, Typinator, TypeIt4Me, and others—can actually help in a number of ways.

Here are a few ways that I use a text expander tool (my choice is Typinator) to help in composing and replying to e-mail messages:

  • There are common phrases that I find myself using on a regular basis, such as “Thanks for your message” or “Sorry for the delay in responding.” Rather than typing these phrases out every single time I use them, I set up a text expansion shortcut to type them for me. So, I just type the three or four character shortcut, and Typinator automatically substitutes the full phrase. Most of the text expansion utilities also have the ability to make these expansions case-sensitive (I know Typinator does), which allows you to substitute capitalized or non-capitalized versions of the phrase.

  • I prefer to use inline or bottom posting in my e-mail replies (instead of the default top posting), so that the entire thread is easily readable from top (oldest) to bottom (newest). However, this frequently throws people off, so I have some “markers” that I use to help readers navigate. These are phrases like “See my reply below” or “My replies are inline, marked with [SL]” (or similar). Rather than typing these phrases manually, I have my text expansion utility do it for me.

  • While many e-mail clients support signatures, sometimes you might want to use a different signature than the “default” signature you have configured. I prefer to use a text expansion shortcut to supply the signature, which allows me to choose which signature to use on a message-by-message basis. For me, this works better than having the e-mail client automatically tack a signature on the message. (You could just as easily have your e-mail client use a default signature, but change it manually using a text expansion shortcut when desired.)

These are just three examples; I’m sure that you can probably come up with more. In fact, I’d love to see what sorts of additional ideas readers might have. Feel free to add your ideas and thoughts in the comments below. Courteous comments are always welcome!

Tags: , , ,

E-mail is the bane of efficiency for a lot of professionals, especially IT professionals. In this Reducing the Friction post, I’d like to share a few tips or tricks that might help making processing e-mail a bit easier.

Remember that I like to talk about processing e-mail instead of managing e-mail. There is a subtle distinction there—one (processing) implies a task that is to be performed, perhaps on a regular basis; the other (managing) implies an ongoing process that doesn’t end. (Which one would you rather do?)

In presentations that I’ve given on personal efficiency, I provided a set of four steps for processing e-mail. These aren’t necessarily my invention; I’ve culled them together from a variety of sources online and in print. Here they are:

  1. If a message contains a task that you can do in under 2 minutes (replying to the message, doing whatever task is in the message, etc.), then just go ahead and do it.

  2. If the task found in the message takes more than 2 minutes, put it into your trusted system. (Personally, I use OmniFocus, but use whatever system makes sense to you.)

  3. If, after performing the task or putting it into your trusted system, you think you need the information in the message, then archive the message according to whatever system you prefer.

  4. Finally, if after performing the task or putting it into your trusted system you don’t need the message, then delete it.

In looking at these steps, it occurs to me that there are 2 places where we can “reduce the friction,” i.e., make repetitive tasks easier, and that’s in steps #2 and #3. In this post, I’m going to focus on #3. I’ll try to address #2 in a future post.

Obviously, how we tackle automating the task of filing messages away according to some system will depend on the system we use. I use a system whereby all messages are filed away by year. All the messages in 2012 get archived into a 2012 folder (or mailbox), messages from 2013 are filed into a 2013 mailbox, etc. To help simplify this process, I wrote an AppleScript that takes the selected messages and moves them to a folder. Here’s the script (if you don’t see the script below, click here):

For my particular system, I change the value of the variable theMailbox every year to correspond to a mailbox for that year (i.e., 2011, 2012, 2013). Then, to further streamline the process, I bound the AppleScript to a Mail.app-specific keyboard shortcut using FastScripts, as I outlined in an earlier Reducing the Friction blog post on using keyboard shortcuts. Now, the process of filing a message into this year’s archive folder is a simple keyboard shortcut away. Super easy!

If you use a system where you file to a few different folders, you could use multiple versions of this script each pointing to a different folder. If you use lots of different folders/mailboxes…then this script probably won’t help you. (Sorry.)

I think part of the reason my people use lots of different folders if that they use the folders as a way of categorizing messages—each folder represents a particular category, project, person, group, customer, etc. I found an alternate way of handling this categorization process by using a tool called MailTags. MailTags is an extremely powerful add-in to Mail.app that allows you to assign keywords, projects, due dates, notes, etc., to mail messages. Further, it allows you to build Smart Mailboxes (saved searches) on any of these properties as well. If you use Mail.app, I highly recommend MailTags.

As I said, I archive all messages for a given year into a single mailbox. To help with the categorization of messages (or to help provide additional context to every message), I assign at least one keyword to every message. Where applicable, I also assign a project. You can create rules in Mail.app that will automatically assign keywords and/or projects, and I highly recommend that. However, you’ll also want to make it very easy to assign keywords manually. Fortunately, MailTags supports AppleScript, so I was able to write a quick script (click here if you can’t see it below) to do that:

If you want to assign multiple keywords, just modify the script to change the value of assignedKeywords to something like this:

{"Keyword1", "Keyword2", "Keyword3"}

Naturally, you could modify this script to assign a project (I’ll leave that as an exercise for the reader), and you could use FastScripts to create an application-specific keyboard shortcut to run the script. This means that you can easily tag your messages with one keystroke, then file them away with another.

When used in conjunction with a good set of rules, I think these scripts can really make step #3 of the four-step mail processing pipeline a lot easier.

Of course, this is just how I work, and your own workflow might be very different. I encourage you, though, to examine your workflow and see if there are ways you could “reduce the friction.” I hope this post provides some ideas to help make that happen.

Tags: , , ,

One thing that I personally have found extremely helpful in making common tasks easier—a key aspect of the “reducing the friction” idea I’ve been discussing—is the use of keyboard shortcuts. In this post, I want to talk about how you might be able to maximize your use of keyboard shortcuts to help improve your personal efficiency.

In my view, there are three aspects to using keyboard shortcuts more extensively:

  1. Using a keyboard-based launcher/search tool
  2. Using a system-wide hotkey tool
  3. Using (and/or customizing) application-specific keyboard shortcuts

Let’s take a quick look at each of these.

Keyboard-Based Launcher/Search Tool

I don’t think it’s any secret that I’m a fan of Quicksilver, regarded by many to be the quintessential tool for OS X in this category. There are other tools in this category, of course; examples include LaunchBar and Alfred. The key value that all these tools add to an existing system is the ability to quickly and easily search for something or launch an application without having to take your hands off the keyboard. Most of these tools also take an “object-oriented” approach that lets you use them to open URLs, open documents or folders, perform web searches, access browser bookmarks, and more.

System-Wide Hotkey Tool

While tools such as Quicksilver (or LaunchBar or Alfred) have some of this functionality as well, I’m specifically thinking of a utility like FastScripts. FastScripts allow you to bind AppleScripts to keyboard shortcuts, either on a system-wide basis or on an application-specific basis. There are other tools similar to this, but this is one with which I am very familiar (I think Keyboard Maestro offers similar functionality, plus other features as well.)

Here are some potential ways you could use this tool to help reduce the friction:

  • Perhaps you want to be able to compose a new e-mail message from any application on your system. You could write an AppleScript that launches Mail.app and composes a new message, then use FastScripts to create a system-wide shortcut key. Now, in whatever application you’re in, you can quickly and easily bring up a window to send a new e-mail message—all without taking your hands off the keyboard or having to switch between applications.
  • Maybe you want to make it even easier to launch a particular application. You could write a very simple AppleScript that launches the application, then use FastScripts or its equivalent to create a system-wide hotkey to launch the app. (This sort of functionality is especially useful if you aren’t using a tool like Quicksilver, LaunchBar, or Alfred.)
  • Like with an application, an AppleScript to open a commonly-accessed folder is pretty simple. Think about being able to use a quick keyboard shortcut to access folders that you frequently use, without having to navigate through the folder structure or switch applications to get there. Handy!

Application-Specific Keyboard Shortcuts

There are two parts to this particular aspect of using keyboard shortcuts:

  1. Using something like FastScripts, but on an application-specific basis
  2. Using OS X’s System Preferences application to customize keyboard shortcuts more to your liking

Use case #1 I’ve kind of already described in the previous section, so I won’t go into it again. There are lots of potential use cases here—creating a keyboard shortcut for an AppleScript that archives the selected messages is one example that might help accelerate your e-mail processing workflow.

Use case #2 is a bit more interesting, I think. A little-known fact is that you can use System Preferences to create new keyboard shortcuts for specific features within applications as well as customize existing keyboard shortcuts. Here’s an example. In some of my applications, the Export command (for saving a file in a different format) used Option-Command-E, but in other applications it didn’t. Since keyboard shortcuts are a little like muscle memory, using the same keyboard shortcut across multiple applications makes it easier and simpler. So, I used System Preferences so that more of the applications I use regularly have the same keyboard shortcut (where possible) for the Export function.

I hope some of these ideas are useful, or that they spark new ideas you might have about how you might reduce the friction in your own workflows. I’d love to hear any ideas or suggestions that other people have, so please speak up in the comments below. Thanks!

Tags: , ,

One of the key things you can do to help improve your efficiency is “reduce the friction”—make common tasks easier, simpler, faster. (This isn’t my phrase or idea, by the way, but I’ve forgotten exactly where I first saw it.) In my last Reducing the Friction post, I talked about how I use AppleScript to help automate part of my blog publishing process. In this post, I’ll share how I help automate some common file management tasks.

The tool that I use here is Hazel, a nifty rules-based file management tool. Hazel uses a set of “if-then” rules to automatically perform tasks on a file based on a set of conditions. I use Hazel for a number of things, but the primary use case I’ll highlight here is automatically archiving files. I use this same technique in two different ways:

  1. To automatically archive files I no longer need/want
  2. To automatically archive published blog posts

The basic rule is the same in both instances, although the trigger is different. Here’s a screenshot of the Hazel rule for the first usage, archiving files I no longer need/want:

Hazel rule screenshot
Hazel rule for archiving files

Let me break that down real quick:

  • The rule condition states that a file must have been assigned the blue color label in the Finder (which, in my system, is what I use to mark a file as no longer needed/wanted) in order for the rule to be fired.
  • Once the rule is fired, then Hazel will move the file to the Archive-Pending folder and clear the color label from the file.

So, to archive files to my Archive-Pending folder (which I periodically move off my laptop to my home NAS for longer-term storage), I simply assign it the blue color label and Hazel does the rest. By the way, you’ll note that this rule is attached to the ~/Documents folder.

I use the same basic rule, with one small tweak, for the second usage I listed (automatically archiving published blog posts):

Hazel rule screenshot
Hazel rule for archiving published blog posts

As you can see, the rule actions are the same (move the file to the Archive-Pending folder and clear the color label), but the trigger is different. In this particular case, I use the green color label, which I’ve named “Finished” in my Finder preferences, to trigger the rule action. This rule is attached to my Blog-Drafts folder.

So, when I’m done with a blog post, I mark the Markdown file with the Finished (green) label, and Hazel automatically moves the post to my Archive-Pending folder. This helps ensure that the Blog-Drafts folder only contains unpublished/in-progress drafts, and also helps ensure that I have an archive of all my blog posts (an archive that is separate from backups of the WordPress database). This second reason, by the way, is one of the reasons I use the publishing process I use instead of just using the WordPress editor (although that is a perfectly fine way of doing it, if that works for you).

So what’s next? Hazel has the ability to watch a file’s activity (based on last opened or last modified dates), so in theory I could have Hazel start automatically moving “old” or “inactive” files to the Archive-Pending folder as well. I’m a bit hesitant to do that right now, but it is an option I might explore in the future.

I’d love to hear any other thoughts readers might have on “reducing the friction” through automating parts of the file management process (either with Hazel or with other tools). Feel free to add your thoughts, ideas, or suggestions in the comments below.

Tags: ,

« Older entries