Looking for writing-related posts? Check out my new writing blog, www.larrykollar.com!

Tuesday, August 30, 2016

Tech Tuesday: Distraction-Free for Free

I’m a very technical boy. So I decided to get as crude
as possible. These days, though, you have to be pretty
technical before you can even aspire to crudeness.
— William Gibson, Johnny Mnemonic

The writing advice people (and websites) are always harping about minimizing distractions. Shut off Twitter (or your social media of choice), close the browser, fill your screen with the editor, and just write look a squirrel! You can even buy special editors that fill the screen automatically… well, of course you can. Seems like everybody and their dogs are trying to make money off writers these days, aspiring and otherwise.

The thing is, it’s really easy to set up a distraction-free writing environment using the tools and apps that come standard with your operating system—at least for MacOSX and Linux. It’s probably true for the Microsoft thing as well, but I’ll have to look at it a little closer. Both MacOSX and Linux evolved from Unix, an operating system that dates back to when computers were more expensive than displays—so you would have a bunch of people using one computer, typing commands and text into terminals. That was back when timesharing didn’t refer to a sketchy way to sell the same condo to 50 people.

The interesting part is, all the code needed to support that circa-1980 hardware is still part of modern operating systems, and we can use that code to create our distraction-free environment. So let’s get to a shell prompt, the way we all interacted with computers before 1984.

Down and Dirty

If I really wanted to get down and dirty, I’d get a USB-to-serial adapter and hook up that old VT220 terminal I still have laying around. But we’re focusing on stuff you already have on your computer.

Personally, I like to have some music playing while I’m writing at home—it masks TV noise, kid noise, dog noise (unless there’s a thunderstorm, then she’s moaning under my feet), and noise from outside. But you might have a stereo in your writing room, or you find the music distracting, and you don’t need anything but a screen to type into.

Keeping the Johnny Mnemonic quote above in mind, Linux is more technical than MacOSX, so it’s easier to get to the crudeness you want using Linux. Press Ctrl+Opt+F1, and you’ll be presented with a glorious console with a login prompt. Most versions of Linux have six of these consoles; press Ctrl+Opt+F7 to get back to the graphical interface. I have never dug into the reason why Linux typically has six text consoles… I’m sure there’s a reason. Anyway, enter your usual login name and password at the prompts.

If you’ve set up MacOSX to automatically log you in when you start up… don’t. For one thing, you’re inviting anyone who gets into your house to poke through your stuff. For another, you can’t get to the one console that Apple provides. To fix this, open System Preferences, select “Users and Groups,” then click “Login Options” at the bottom of your list of user names.


Once you’re there, make sure “Automatic login” is set to Off. Next up, set “Display login window as” to “Name and password.”

While you’re in this screen, make sure your regular user name is not an administrative account. Set up a separate admin account if you need to, and remember that admin password. These are things that make it harder for malware (or your teenage niece) to do things they shouldn’t be doing on your computer.

But I digress. Next time you log in, instead of typing your usual user name, type >console and press Return. This immediately drops you into a text console and presents you with a login and password prompt.

So… Linux or Mac, you have a text console until you press Ctrl+D at a shell prompt to exit. Skip down to “Now What?” to see what’s next.

Work Within the System

If you’re not quite ready to abandon all hope the graphical interface entirely, because you might need to jump onto the Web to goof off research something important, you can still eliminate most distractions… although all those distractions are still easily available if you can’t resist. Perhaps it’s a small price to pay to have your music, right?

Most Linux systems make it really easy to get a terminal app on the screen, whether through shortcuts or the application menu (look in Accessories or Utilities). Macs aren’t much more difficult—press Cmd-space to pop up Spotlight; typing term should be enough for it to complete Terminal (it’s in /Applications/Utilities if you want to do it from the Finder). Press Return, and it should start. If you’re using the Microsoft thing, look for “Command Prompt” or “PowerShell” in your Start menu. One or the other should be in Accessories.

Now that you have a terminal window up, you need to maximize it to keep the distractions at bay look a squirrel!. On Macs, press Ctrl-Cmd-F to enter full-screen mode (press it again to exit). On Linux, your distribution determines the keystroke; Ubuntu uses F11. You can always click the “maximize” button to expand the window, although this leaves extraneous window elements visible. You can also maximize a command window in the Microsoft thing.

One of the advantages of a terminal app over a console: you can increase the text size, either by using the terminal app’s preferences or by using a keystroke (Cmd+ on Macs). 18 points should be sufficient on a laptop; you might want 24 points or even huger on a big desktop screen.

Okay, you’re ready to go…

Now What?

Okay, now you have a screen full of nothing but white text on a black background. There’s a prompt at the top, usually ending with a $ symbol.

The distraction-free writing paradigm basically turns your computer into an electronic version of a manual typewriter. No going back, no editing on the fly, just type your story and hope the result isn’t too incoherent to salvage (says the guy who likes to edit as he composes).

There are few lower-level ways to input text than using a line editor, and Unix derivatives (including both Linux and MacOSX) include ed.  Johnny Mnemonic, that technical boy, would have been proud of ed. It’s about as crude as it gets. So let’s get crude! Type ed and press Return.

Nothing happened. Or did it?

Ed (as we’ll refer to ed for a while) is a program of very few words, which is exactly what you want when you’re going for a minimalist writing environment. If you give Ed a command he doesn’t understand, or one that might destroy your work, he will respond with ? (a minimalist understands when that means “huh?” or “you don’t really want to do that, right?”). Ed’s commands all consist of a single character; in some cases, you might include a range of lines or some other info. But right now, there are three commands you really care about.

Right now, you should see a blank line. Type i and press Return. This enters input mode, where everything you type is copied into Ed’s buffer. Ed will happily ingest everything you type, until you enter a line containing only a . character. That tells him to return to command mode. The following screen shot shows an example.


Now for the second command: saving what you entered. Type w and the name you want to give the story. Make sure you’re not using that name already, or you’ll overwrite what’s there! I reserve a few file names like foo, junk, and tmp for situations like this, when I either don’t need to keep what’s in the file or plan to do something else with it right away (like copy it into Scrivener). Anyway, after you use the w command, Ed responds with the number of characters it wrote into the file. If you want a rough word count, divide by 5 (I wrote 1458 characters, a shade under 300 words, in the above example).

All done! Type q and press Return, and you’ll return to the shell prompt. If you want to keep writing instead, type $a and press Return. This command means “go to the last line” ($) “and append.” Again, Ed will take everything you type as input until you enter a line containing only a . character. This time, you can just type w and press Return, because Ed remembers the last file name you used. Just remember to use q when you’re done.

Bonus Info

Now you’re at the shell prompt, and you want to know exactly how many words you typed? Type wc and the file name, and press Return. The info you get looks like this (using the above example):

Kahuna:fiction larry$ wc tollen.md 
      31     269    1458 tollen.md
Kahuna:fiction larry$

You get three numbers: lines, words, and characters. So that number in the middle, 269, is the actual number of words I wrote.

If you’re not enamored with Ed’s ultra-minimalism, try entering nano or pico instead. Both of these are simple screen-oriented text editors that include a little help at the bottom of the screen (but will let you arrow back and noodle with the text).

Like with any writing tool, you’ll improve with practice. Don’t give up right away; try a different editor or even a different color scheme (most terminal apps let you choose colors). And don’t forget to copy your text into your normal writing tool!

Your Turn!

Have you ever tried a minimalist writing environment? How did it work? Get as detailed (or as minimalist) as you like in the comments.

No comments

Post a Comment

Comments are welcome, and they don't have to be complimentary. I delete spam on sight, but that's pretty much it for moderation. Long off-topic rants or unconstructive flamage are also candidates for deletion but I haven’t seen any of that so far.

I have comment moderation on for posts over a week old, but that’s so I’ll see them.

Include your Twitter handle if you want a shout-out.

LinkWithin

Related Posts Plugin for WordPress, Blogger...