Distraction-Free Word Processor


First Prototype


After seeing ads for the FreeWrite and going so far as to buy an

AlphaSmart Neo2, I decided that this a problem spaced under-served by

Linux. Sure, there is the E-Ink DIY one driven by a Pi, but it's not

really practical:

https://hackaday.com/2018/10/20/e-ink-typewriter-is-refreshingly-slow/.

This project is about making a Linux software solution based on more

conventional hardware and making use of kiosk tools for Linux. This

also lets me satisfy other itches, like adding calculator

functionality via SageMath or circuit simulator functionality via

Falstad.


https://hackaday.com/2018/10/20/e-ink-typewriter-is-refreshingly-slow/


Currently the project is based on an i3 Intel NUC running Xubuntu + FocusWriter. I have a couple of decisions to make:


1. Should I stick with Intel, go to ARM or stay processor-agnostic?

2. Should I use native fullscreen applications or web-based ones running in FIrefox in kiosk mode?

3. How to Sync? Should I support cloud/network storage, USB drives or adding hardware to emulate a keyboard like the AlphaSmart?


Currently (1) doesn't seem to be too important. There are pros and

cons either way. Staying on Intel means better availability of

pre-prackaged software and the ability to use the majority of

Chromebooks. Going to ARM means the ability to use Pis, Pi0's and

PineBooks, and is probably a better choice for a hacker project. A

cyberdeck version would be pretty sweet.


With (2) the majority of writing applications are written natively so

I haven't found any self-hosted browser-based solutions for writing

other than


https://github.com/writeas/writefreely.


However, a Firefox kiosk-based solution means a couple other benefits:

I can limit internet access by whitelisting sites rather than removing

or disabling networking hardware. This means that I'm not limited to

self-hosted solutions and can use ones that are fully or partly

cloud-based like


https://www.calmlywriter.com/.


This also makes it

easy to add local web-based capabilities like SageMath/Falstad, or

other cloud-based ones like Cocalc/Repl.it/Overleaf. Honestly, having

calculator functionality is more interesting to me than just a writing

tool (I'm an engineer and frankly not much of a writer).


With (3) supporting cloud/network storage is easiest from the

user-interface perspective. Using USB drives means the need to give

the user access into the filesystem, complicating UI. And much as I

like my AlphaSmart, emulating a keyboard is a slow unreliable and

pretty rubbish way of transferring data.


Word Processor Hardware Front

Word Processor Hardware Back


Notes Software


After a bit of research, there really isn't much in the way of

distraction-free writing apps that work in a browser. The most popular

(Typora, commercial and FocusWriter, FOSS) are native. Probably this

is an entirely reasonable thing. Currently I'm looking at notes apps.

Standard Notes seems nicest, but it's a bit of a pain to get running.

Reasonable alternatives are Trillium, Wiki.js, BookStack, WriteFreely

and the various NextCloud notes add-ons.


Tiling Window Managers


I've flip-flopped again on the software design, and decided to go for

a more hacker-ey approach that uses a tiling window manager + terminal

window instead of a browser in kiosk mode. I'm using the following

software:


Xubuntu 18.04
Xmonad window manager
XFCE4 terminal
Vim/Nano text editors
Feh image browser
Zathura PDF viewer
W3M browser
Ranger/NNN file managers
HTOP system viewer
NCDU disk space viewer

I discovered it's pretty easy to hack together a menu-based interface

with Fish shell script, though it's a bit janky. Better options are

wiretail (easier, more portable)/dialog (more verbose, more flexible)

which allow for decent-looking GUIs in shell scripts.


Off-topic, I also learned about Zenity which is the GTK equivalent. It

has Python bindings and seems like a nicer alternative to PyQT (pretty

but tedious to code up) and PySimpleGUI (fast to code but hideous as

the library tries to look like a 90s WinForms enterprise app).


Console Menu Interface for Linux 2020-11-12


I've been working on a menu-based interface for Linux based on the old

DOS shareware program Automenu. My first prototype was hacked up in

Fish Shell here:


https://github.com/akbarnes/pymenu/blob/master/launcher.fish


and strayed away a bit from the Automenu style in that it includes

basic support for directory bookmarks and directory navigation. Unlike

DOS, Linux software tends not to have user-friendly file open dialogs

so this seemed like a warranted feature. The downside with Fish is

that it's impossible to create fullscreen menus without additional

software such as whiptail. My next step was a more elegant solution in

Python that was originally based on urwid but later switched to

blessed:


https://github.com/akbarnes/pymenu/blob/master/pymenu.py.


I recently discovered


https://github.com/aegirhall/console-menu


which appears to be "whiptail for python" and


https://github.com/mogproject/easy-menu


which is the closest I've seen to "Automenu for Linux."


Art, 2020-10-22




hektor.flounder.online/