[![screenshot - taro-ls showing Archives/2022 mailbox selected with a search query active listing mail from the uxn mailing list, and a reader window open next to it reading the initial uxn metadata proposal, with a prompt at the bottom for managing attachments, replying, forwarding, or quitting](./screenshot.png)](./screenshot.png)
1. [Install](https://git.vuxu.org/mblaze) and [configure mblaze](https://git.vuxu.org/mblaze/about/man/mblaze-profile.5) (as well as probably [mbsync](https://isync.sourceforge.io) and [msmtp](https://marlam.de/msmtp))
-`TARO_LIB`: the directory where your runtime files (`taro-ls` rom, `taro-reader` script, `.theme` and `font.icn` files, etc.) will be installed to, as well as a copy of `uxnemu`
-`TARO_ENV`: environment variables as you type them in the terminal, that you can use for the `READER_PROG` and `COMPOSE_PROG` commands
-`READER_PROG`: command to spawn to read mail - by default it calls the `st` terminal with some environment variables and options set, and runs `taro-reader`
-`COMPOSE_PROG`: command to spawn to write mail - by default it calls the `st` terminal with some environment variables and options set and runs `mcom` from `mblaze`
The [.theme](https://wiki.xxiivv.com/site/theme.html) file format is supported - it can be crafted with [nasu](https://git.sr.ht/~rabbits/nasu) and should be located at `TARO_LIB/.theme`. The following details the purpose (and default) of each color:
1. Background and text color when hilighted (black)
2. Hilight, scrollbar, button hover color (turquoise)
3. Soft fg color eg. resize handle, textbox help (medium gray)
4. Foreground/text color (whitish gray)
Any 8x8 1bpp ASCII font in [icn](https://wiki.xxiivv.com/site/icn_format.html) format can be used. They can be created/edited in [nasu](https://git.sr.ht/~rabbits/nasu) and located at `TARO_LIB/font.icn`.
- Mailboxes: it's assumed by taro-ctrl that your inbox is named INBOX, and it exists; it's put first, and the rest are shown in alphabetical order
- Mail List: your mail in the default scan-format given in your mblaze-profile is shown here
- Actions: button list and initially hidden text input area
Left clicking on a mailbox switches to that mailbox. Left-clicking on mail selects that mail. You can do multiselect by holding shift when clicking. Right-clicking on mail opens that mail (only the first in the selection if 2 or more are selected). You can also use the `Enter` key to open mail.
The buttons on the bottom are as follows (with equivalent keybinds):
- compose [`n`]: open a compose window to write new mail
At the bottom-left, a small indicator will appear if you have a search query active. Performing the refresh action or switching mailboxes will make it disappear.
-`o`: open an attachment - you are presented with the MIME structure of the mail with parts numbered and prompted to select a number to open. The programs to open each mimetype are in the aforementioned `handle` function of the script.
-`s`: save an attachment - like `o` but selecting a MIME part saves it to the folder `TARO_DOWNLOADS` in `config.cr`
The attachment actions loop until you enter nothing or a non-numeric value. The whole script loops until you quit.
### writing mail
Writing mail is currently done by opening a terminal and calling `mcom`, which lets you compose in your `EDITOR` of choice and prompts for additional action.
If you try to decrypt/sign with either `pinenetry-tty` or `pinentry-curses`, GPG will attach it to the stdio of `taro-ctl`, not the terminal window where you are viewing/composing mail. Use a graphical pinentry program instead.
`taro-ctl` creates a socket at `TARO_LIB/taro.sock` and listens for bytes on it. Every time a byte is written to the socket, `taro-ctl` will use message `15` to update the inbox. Whatever method you use to sync your maildirs to your mailserver, it can write a byte to this socket when you receive mail!