all repos — taro @ d6b0ec63c85e1c77857378b89ac6ed2d790a1010

mblaze frontend in uxn + crystal

improve readme and mread
Iris Lightshard nilix@nilfm.cc
PGP Signature
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEkFh6dA+k/6CXFXU4O3+8IhROY5gFAmQc0WIACgkQO3+8IhRO
Y5it6g/7BhPC/BTRkpu6v5iH5uo4CqizjpYZR0SwBHtsrZbpQ+X5vxHsOHpmG3IG
+iDUlpWwx9Q/9B6JWTMj1CVrl/+1/Ye8DzOrGjKWGjqlWFBowOZ/wGRy5EBlNyFg
6SMTPXirmVumqhzY1nLQOJcziDro3beoqzV7SCkU65/jyDKNlAGITFQeHXmRvIuz
v07ehZEcXvuPRcfBEnydRYtZs11qDHEeWOLFfd0jD247O55VGSfVbVE2HCnwGCL6
DvlxTvHOtdUlpGxU1mlagOC2wxu4WEj5QdapOaZ0+yvchnJ1csDXJIkJYmF3SH7h
CywlSAQqCSXqM3Dh3j356BWLeM2JVJwYcKFdMecil4O6TvYIHxT2r9PCGzvW6ka9
YGh6/nSZrPQI35L46PBeNStYaqk3itn1nYghCq73IbW6CO3hcrKIgywxOp6Kx/Fh
2UQFB8NpSGd5RQIjKKmAfu2jHodKy0hagtBo5a5c+29De0moZh0bNCAYj2NE+1Av
M2NmJx7aFXhHCKi7GtpcuHUNzdU8IvRts6UANRYELPwcN4D/dmzzm/cYAEa2fQhK
OAhzzJNHhF0XURyprIyHasYo87C+DGIY+0qeWuYEETa3+MAGYwoga8f9ZZNL+IM6
cUfWvXjXt2dtZ4SmOdHjXtEmDk2q452z8o/blUr221Chw+bAuDI=
=BMZB
-----END PGP SIGNATURE-----
commit

d6b0ec63c85e1c77857378b89ac6ed2d790a1010

parent

a795631f8a3afe19e706929b6586d7595bf31fd7

2 files changed, 35 insertions(+), 4 deletions(-)

jump to
M README.mdREADME.md

@@ -10,17 +10,48 @@ 3. Edit [conf.cr](./conf.cr) and probably the `handle` function in [mread](./mread)

4. Run [build.sh](./build.sh) 5. Copy `taro-ctl` to your path +## usage + +The `taro-ls` window has three main areas: + +- 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 +- refresh [`r`]: refresh the current mailbox +- mark all read ['.']: this +- search [`/`]: search mail with a regex (only headers, case sensitive) +- refile [`m`]: move mail to the given folder +- trash [`Del`]: move mail to the Trash folder, unless it's already in the Trash, in which case it's deleted + +There is a resize handle in the bottom right - clicking and dragging it resizes the window. + +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. + +## TODO + +- Make `mread` more user friendly +- Implement keybinds for changing mailbox, selecting/scrolling mail, resizing +- Flag/star messages? I never use this fature if IMAP... +- Real `uxn` implementaions of reader/compose windows? Probably overkill + ## messages Messages are in the format `[1][2:3][...]`: + - byte 1 is the message type - bytes 2 and 3 are the length of the message, in bytes - bytes 4 and beyond are the message itself (payload) - won't be present if the length is 0 Even messages go from `taro-ctl` to the `uxn` windows. -- `0`: mailbox list -- `2`: list mail in current mailbox (or search results) +- `0`: mailbox list (truncated to 4k - this should be enough) +- `2`: list mail in current mailbox (or search results) (truncated to 32k - if you need more, use search) Odd messages go from the `uxn` windows to `taro-ctl`.

@@ -30,4 +61,4 @@ - `5`: search mail; payload is the regex

- `7`: refile mail; payload is the beginning and end of the mmsg range in u16, and then the mailbox name - `9`: trash mail; payload is the beginning and end of the mmsg range in u16 - `11`: read mail; payload is a single u16 message number in the current sequence -- `13`: compose mail; no payload +- `13`: compose mail; no payload
M mreadmread

@@ -21,8 +21,8 @@ }

_mread() { local META - local this=$(mseq $@) mflag -S ${this} + local this=$(mseq $@) while true; do mshow ${this}