My colourful plaintext to-do list
I have probably tried more alternatives for to-do lists than anything. And while there’s a lot of good options out there, I really don’t need all the bells and whistles that most comes with.
Then there’s the syncing issue as well. I haven’t really found an application that I both like and that supports syncing with my phone in some easy and sane way.
So, one day I decided to try out the plaintext route. Plaintext is after all one of my favourite things in this world! After a little bit of tinkering I settled on the workflow of simply using my editor Vim and then Supercat, which works like cat
but supports colourised output via regular expression.
The command I use to view the document is $ spc -c <config> <document>
and I have put it in a small script for easy access:
#!/bin/bash
file="$HOME/Documents/todo.md"
spc="spc -c $HOME/.config/supercat/markdown"
case $1 in
ls)
echo ""
$spc $file
echo ""
;;
edit)
vim $file
;;
esac
My configuration for Supercat looks like this:
# spc configuration file
#
# col - color (blk, red, grn, yel, blu, mag, cya, whi)
#
# a - color attribute (console_code)
# ' ':normal (0)
# '-':normal (0)
# 'b':bold (1)
# 'u':underline (4)
# 'r':reverse-video (7)
# 'k':blink (5)
#
# n - number of matches, (' ':1, '1'-'9':1-9, '0':all)
#
# t - pattern type
# 'c':chars (strchr)
# 's':string (strstr)
# 't':regexp (regcomp) (convert 10-digit unix time to MMDDHHMMSS)
# 'r':regexp (regcomp)
# ' ':regexp (regcomp)
#
# col a n t pattern
#################### ### # # # ########################################
H1 yel 1 (^#\s.*$)
H2 mag 1 (^##\s.*$)
Prio High red 1 ##(\sHigh)
Prio Medium yel 1 ##(\sMedium)
Prio Low grn 1 ##(\sLow)
Numbered list item blu 1 ([0-9]\.)
List item blu 1 (^-)
List item blu 1 (^\*)
Highligt cya \*(.*?)\*
I then use Syncthing to sync the document with my phone and on my phone I use an application called Editor (which is available on F-droid here) to view and edit the document.
I have also added a shortcut on my home screen that opens the file directly in Editor for quick and easy access.
I understand that this might not be a good solution for all, but me personally like the simplicity of it. :)