Archive for the ‘lifehack’ Category

How to make your mac read to you

Wednesday, January 24th, 2007

Sometimes I’ve got a nice big long article I want to read and have to shoot out of the door, effectively not giving me time to actually read it. Sometimes I save it for later by marking it up in my del.icio.us bookmarks, but if it’s something I really want to read, I’ll use this handy little Automator workflow to save it out:

Untitled-1

I set the ‘Text to Audio’ action to ‘Show action when run’ using the expansion arrow:

Showactionwhenrun

This way you can set the file name of the resulting audio to something sensible, rather than have it set to the same thing every time – the file name will appear as the track’s title in iTunes.

All you have to do now is copy whatever you want into a blank TextEdit document and run this workflow – you don’t even have to save the document, Automator can pick it up regardless. The computer voice my trip over some words, particularly some non-english words. But it’s easy to comprehend.

You can set the rate in the System Preferences ‘speech’ preference pane:

Speechrate

I set the Genre to ‘Podcast’ to take advantage of iTunes’ smart playlisting – I have an ‘Unplayed Podcast’ smart playlist with any podcasts with a play count less than 1. That way I can find it easily on my iPod.

Setting Smaller Goals

Thursday, January 18th, 2007

Ramit over at I Will Teach You To Be Rich has posted a great little article on the importance of setting small goals and avoiding burnout.

It’s really important stuff to bear in mind, and stuff that’s borne out in my own experience. When I started writing every day I set a goal deliberately that didn’t make me sweat too much (five hundred words), and then moved it up once it was comfortable.

I’m also doing this at the moment when I’m trying to Get Out Of Bed When I Don’t Actually Have To (i.e. I don’t have any work or a meeting to go to) – currently I’m out of bed every morning around 9 am, and I’m going to start moving it back to before that, around eight-thirty. It’s not an ideal time, but it’s better than lying in ’til noon like I used to (and yes I know all about Steve Pavlina’s How To Become An Early Riser and How To Get Right Away When Your Alarm Goes Off, I just didn’t find they worked for me. But they might for you).

It’s all about Progressive Training, see.

The Automator Alarm Clock

Tuesday, January 9th, 2007

There are a bunch of apps out there – some free and some shareware – that allow you to use your mac as an alarm clock. They’re mostly pretty good too, but I like the customizability of an Automator based solution, and I think you will too – with a little drag and drop you can have a very complex little morning radio bit.

The Basic iTunes Alarm

You can make a very simple little alarm with just three actions:

  1. Set Computer Volume (turn the volume up to maximum in case you muted it the previous day)
  2. Get Specified iTunes items (select the playlist you want to play in the morning)
  3. Play iTunes playlist

Here’s a screencap of what the finished article should look like:

Basicitunesalarm

Next, save it and select ‘Save As Plugin’ from the menu, and choose an iCal plugin. Automator will spit out an action into iCal, which you can move around to the proper date and time and also set repeats.

Now, iCal alarms will wake your mac from sleep but not from a shut down state (which is just as well, really). If you shut down your mac every night, you’ll need to set up a little scheduling. Fortunately this is simplicity itself from the Energy Saver preference pane. Open up System Preferences and click ‘Schedule’:

Schedulingsetup

Then put in the time you want your mac to wake. It can be at the same time or a little after – the mac will run as soon as it wakes up.

You’ll also need to set auto-login:

Auto Login

I’ve blurred out the accounts and account names because I’m incredibly paranoid. So don’t worry about that blocky effect.

Also, a brief warning: this is a security risk, so I’d set it back to a proper login if you ever leave your machine unattended where someone might faff around with it.

Once all that’s done, you should have a simple little Automator alarm clock that you didn’t have to pay for or anything. Wohoo! But of course plenty of freeware will do this, so what’s the real advantage? Customizability!

Advanced stuff

You can drop other actions in teh bottom of the queue easily. My personal favourite, though, is having a little built-in DJ.

Simplespeech

The iTunes volume actions will turn the music down to let the speech server talk over the music, but you can use the system volume options to really blare out the voice if you want. I don’t, because my Macbook’s tawdry built-in speakers simple don’t allow it – maximum volume is about right for music.

Beyond that, you can add more complex speech: for example, here’s a little Applescript that’ll interface with the rather fine (and also free) ?TextWrangler:


tell application “TextWrangler”
open “path/to/file.txt”
set readOut to line (random number from 1 to 22) of document 1 as string
end tell

say “Today's usage rule is: ” & (usageRule)
Using Automator’s ‘Run Applescript’ function you can get this script to read random lines from a text file (mine contains the usage rules from Strunk and White, which I laboriously typed out). To double check the line numbers in TextWrangler, just use the ‘Add/Remove Line numbers’ function in the ‘Text’ menu

Other stuff

Using my previous hint to set display sleep times, you can make sure the screen isn’t blaring away (although personally I’ve found the bright screen useful in dark mornings).

You can also open websites, check RSS feeds, or even download and open your local free Metro newspaper (no uk version, bah!).

So that’s quite handy.

A warning: Backpedalling

Tuesday, December 26th, 2006

This is a bit of a warning to you folks concerning something I’ve had issues with and am wrestling with right now. I use Steve Pavlina’s 30 day trial approach for forming new habits, and it works like a doozy, but something I found the other day is that it’s very, very easy to backpedal into an old pattern, especially if it’s particularly enforced.

For example. Ever since I’ve been a kid, I’ve lazed in bed and slept in for as long as I could. I don’t have particularly vivid dreams or anything, it’s just natural bone-idleness. I’ve shaken off the bone-idleness and subsequently installed the habit of getting up at 7am every morning, rather successfully as well.

But recently, I got a bunch of essays in at college and felt like relaxing, so I took a day off from this and sat in bed for the morning. The next day I had nothing urgent on and did the same thing. And the next day. Now I’m rasslin’ again, and trying to get back into the old habit slowly, and ease back – I was up at 10am this morning, which is better than yesterday. I’m aiming for 9 the next day, 8 the following day, and so on and so forth until I can get back to seven.

Incidentally, this isn’t time spent sleeping. Much of it is, but a lot of it is sitting in bed with my laptop (curse you convenience of wireless internet!), reading email and RSS feeds. That’s something I’d probably end up doing anyway, but the morning is my key productivity and thinkin’ time, and I’d rather not waste it on reading about what Neil Gaiman is doing for the christmas holidays. I swear, sometimes I’m like this incredibly lazy cyber-stalker.

Find the right time to work for you

Saturday, December 16th, 2006

I had a big essay due in on Friday (2,500 words on Phenomenology in Archaeology), and I managed to get it in on time… just. But it was a stressful time for me, and I want to talk to you guys about what I’ve learned from the experience.

In looking at the weeks work, I notice one important factor – I was at my best and most motivated in the morning, normally around 9am-11am. I noticed this earlier, but that knowledge didn’t sink in, and when I meant to work in the afternoon after time at university, I found myself playing Halo instead, despite my best intentions. I got about 200 words done that day when I had wanted to do at least 500.

So, I implore you dear readers, all of you: look at your energy levels throughout the day, grade your energy levels, say – then schedule your most challenging projects for that time.

Quicksilver for droplets

Monday, November 6th, 2006

One of the amazing and particularly ginchy features Quicksilver has is one that I don’t often hear people talking about, and sometimes wonder if many people are aware of.

Whenever you have something selected in a quicksilver pane – application, file, whatever – you can drag it right out of that pane as though you were dragging it in the finder. So you can drag a file out of quicksilver onto an application on the dock to open it, or you can make a copy or an alias of it with keystrokes as usual.

But what’s really handy about this – perhaps even extra-super-awesome – is that you can drag things onto one of these panes as well. So if you’ve got a handy dandy droplet but it’s not in your dock, you can just call it up with Quicksilver and there it is, no faffing around necessary.

This is also handy for opening files with nonstandard applications.

So woo! Another piece of awesome from the single finest program on the mac.

Using Automator as a display power button in os x

Friday, November 3rd, 2006

The Problem

I like all-in-one Macs. Currently I have a Macbook, before that I had one of the old CRT eMacs. The all-in-one design minimizes clutter and cable mess. There’s a tradeoff in a lack of upgradability and maintenance, but I feel the pros outnumber the cons.

Anyway, these macs are all missing one feature that, for me, is rather important: a power button.

If I’m doing a batch-processing task, or downloading an especially large file, I like to be able to switch off the display on my Macbook to avoid power costs – that display is the really power-hungry part of the computer. The only easy way to do this with an all-in-one is to open system preferences, go to energy saver, and drag that little slider all the way to the left.

That’s okay, but I’d prefer a keystroke, thankyou-very-much.

There are Applescript solutions available, but they involve playing around with the pmset command line utility, which requires sudo access to alter, so you have to play around with sudoers and whatnot. I’d rather avoid that if I can.

Instead, I’ve found a ginchy way to do this with Automator.

The Fix
So to fix this I’ve found a neat little Automator action that you can download and install yourself. You can get it here as well as lots of other handy-dandy Automator doodads.

What this action does is give you a slimmed down version of the energy saver right there in the Automator window. Here’s a pic to illustrate:

Picture 1-1

Now all you have to do is make up a simple one-action workflow and attach it to a keybinding. Bam! Display on/off switch. Well, sorta – it turns off after a minute. But it’s the closest thing you can get.

You can also use this action in a bunch of other workflows – I use it in my alarm clock script to ensure that the display turns off while the musics are waking me up. Hallelujah!