Hacker News new | ask | show | jobs
Ask HN: How to setup a distraction-free Linux setup for writing
6 points by devanil 977 days ago
There's no way around it: if there's internet available, I'll disperse. I thought about buying one of those modern typewriters (like the Freewrite), but they're expensive or impossible to find where I live.

I thought: I'm going to take my old notebook and install Linux that will only be used for writing only. What do you recommend installing for this purpose? I have intermediate knowledge of Linux, but I didn't want to spend a lot of time configuring it.

5 comments

If your main computer uses linux you can use a script to start your writing app and have that script disable distractions for a certain amount of time. Simplest would probably have it start the writing program full screen and disable all WM/DE key bindings and hide any panels if it does not already do so in full screen so you can not leave full screen/open other apps until you quit the writing app. If you do not use a DE/session manager you can have an .xinitrc which does not start a WM and only starts the writing app, so when you want to write you log out and start X with the writing .xinitrc. This may be possible to do with a DE/session manager but I have very little experience with those so can not say.

If you just want to turn your old laptop into a fancy word processor just have your .xinitrc only start the writing app and you will not have access to anything else.

I suppose for these methods you would also need to have the script temporarily set your xdg default browser to something which is not a browser if your writing app uses the browser for help files since that would allow you to open a browser.

Why not just turn off all the devices and get out the pen and paper?

Edit: Probably easier to just have the script turn off networking than playing with the xdg defaults.

Maybe this could be useful.

I had a similar need where I always wanted to be able to start writing at a moment's notice, ideally with a key-bind of some sort where I didn't have to wait for the editor splash screen and various indexing operations.

I have created a flow where a key-binded system command would invoke a script which did the following:

1. Create a new instance of a terminal in full-screen mode / maximised (key binding can allow you to open up a terminal instance with parameters to specify view options)

2. In the newly created instance, open up a command line editor (vim in my case).

^^ The above is a simple starting point, however, you could add extra steps like disabling the network interface for a set period in the script, adding templates to different key-binding invocations etc.

Check this blogpost about a distraction free, minimalist writing device: https://taoofmac.com/space/blog/2023/09/22/1230
Setup the extra laptop, get all the software you need installed, and then... open it up and take out the wifi card. Find a USB stick or three, and then use that to get documents on and off the machine.

Or get a Remarkable 2, which technically has wifi, but not enough to be distracting (for me, anyway).

Debian without the GUI, and your favourite CLI text editor. You turn it on, log in, run "vi book.txt", and you're writing.