Raspberry Pi Zero Distraction Free Writing Machine
January 12, 2020
This week I got a Raspberry Pi Zero. For my first simple project on it, I decided to make the Zero a distraction free writing tool. The goal was to plug in a keyboard and monitor (no mouse) and have the Pi boot up and load a distraction free writing software.
For the writing software I chose FocusWriter. As the name implies, it’s meant for focus writing. By default it opens in full screen and has a nice and simple dark theme. And it’s free.
To install FocusWriter:
sudo apt-get install focuswriter
To run FocusWriter on boot I tried modifying the rc.local file, .bashrc file, and crontab. The program didn’t boot correctly with any of those options. To correctly launch FocusWriter on boot I modified the autostart file. These programs load when LXDE is loaded.
sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
The file changed to:
@lxpanel --profile LXDE-pi @pcmanfm --desktop --profile LXDE-pi @focuswriter @xscreensaver -no-splash
Once the Pi rebooted FocusWriter loaded on launch. The only problem was I wanted the mouse unplugged. The mouse was appearing in the top left corner of the screen. Since the mouse wasn’t plugged in and being moved, the mouse stayed there. To get rid of the mouse I installed Unclutter.
sudo apt-get install unclutter
One final change to the autostart file to run Unclutter as well.
@lxpanel --profile LXDE-pi @pcmanfm --desktop --profile LXDE-pi @unclutter -idle 0 @focuswriter @xscreensaver -no-splash
Now when the Pi boots it automatically pulls up FocusWriter which takes over the whole screen and hides the mouse. The keyboard can create new files, save files, and by using control + alt + t a terminal window can be opened. In this terminal window I can cd into the folder where I save the writing files and use git to back them up on GitHub. And the Pi can be rebooted or shutdown from the terminal.