add search indicator
Iris Lightshard nilix@nilfm.cc
PGP Signature
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEkFh6dA+k/6CXFXU4O3+8IhROY5gFAmQfSksACgkQO3+8IhRO Y5ijQQ/9GDnN+rOyqIYhn8Tzelo/yUZJ6JR35afaykDyTQ/IXYgt0jkl9xaFOaDZ BLbj9RiQdIjpju2izbhXMyGCnsoc7O3H9H74OGyFMctJamzsAGtOYXk+AYA9Y00L oAzWmOXCqB7gVWWDIDWvlp57fwaCNhxYTWF5+P+XFmlaiWUvY+srwDHHtJFG9f16 HNIijdhM5gM0wnstaTK2/OqiQ6S8CjJ584mdChAtNYil/ZkbCTTz02rKoraGhBkx FLD1WJ+55cF/heZQw3ReKWnW/1Pc0JB1n6NMlpWc6H8SPIdHZe0wAuF157TXyeiI tl5xnMIQrBsu5MClH+u/NqYqLOfiNplfSmsAsO3mz/kW6SeKQ8/rjFUUFQBlzIcb dYJX6PYRxlhQTcR97JkIUsw3mf7TXbhEJPRDleopNbT226EjJDrimlKOjPpHK1RU I7AG75NwuGhA30JkwQmvlHIJyamL78re2iAZA58eJIckt17w7F9ctETtUqRBMSj/ NdVAuW3Vfef+F6lt6JM9yjT5CVXDUhZCQ+15K+9u3QL+LRuUV6HvsDT2JAnRgjm4 IUTSxkELg1uMpNADrNnCTTm4k2IHjRgJS4zWd0l3UmMaZCWrlLumgVvr6FVbDsDO piV0n15F1m/U9NNTspXW+dwE+W4ES7MI1BIJFz3C1jzQ4Q/R3ks= =7u1U -----END PGP SIGNATURE-----
2 files changed,
30 insertions(+),
3 deletions(-)
M
README.md
→
README.md
@@ -41,6 +41,8 @@ - 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. +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. + ### reading mail Reading mail is currently done in a terminal that pipes the mail content into `less` and gives some keybind options:
M
taro-ls.tal
→
taro-ls.tal
@@ -55,10 +55,10 @@ ( variables )
|0000 -@refresh [ &mboxes $1 &list $1 &fg $1 &btns $1 &textbox $1 ] +@refresh [ &mboxes $1 &list $1 &fg $1 &btns $1 &textbox $1 &etc $1 ] @resizing [ $1 &x $2 &y $2 &dx $2 &dy $2 ] @decoding [ $1 &msg_type $1 &counting $1 &count $2 &processed $2 ] -@textbox [ &mode $1 &len $1 &cursor $1 &msg $2 ] +@textbox [ &mode $1 &len $1 &cursor $1 &msg $2 &searching $1 ] @mboxes [ &bytes $2 &data $2 &len $2 &offset $2 &elem_offset $1 &top $2 &height $1 &select_index $2 &select_len $2 &sb_len $1 &sb_pos $2 &sb_step $2 ]@@ -202,6 +202,9 @@
#01 .Console/write DEO ;selected_mbox strlen SWP .Console/write DEO .Console/write DEO ;selected_mbox send_str + + #00 .textbox/searching STZ + #01 .refresh/etc STZ JMP2r@@ -218,6 +221,8 @@
SEARCH_MAIL .Console/write DEO ;textbox_text strlen SWP .Console/write DEO .Console/write DEO ;textbox_text send_str + #01 .textbox/searching STZ + #01 .refresh/etc STZ JMP2r@@ -529,6 +534,7 @@ &chk_release
#01 .refresh/list STZ #01 .refresh/mboxes STZ #01 .refresh/btns STZ + #01 .refresh/etc STZ .Screen/height DEI2 TOP_SECTION BOTTOM_SECTION ADD2 MID_SEPARATOR ADD2 SUB2 #03 SFT2 NIP .list/height STZ .Mouse/state DEI@@ -744,15 +750,32 @@ ;textbox_text #0008 .Screen/height DEI2 #0018 SUB2 #03 draw_str
draw_bone .textbox/msg LDZ2 #0008 .Screen/height DEI2 #0010 SUB2 #02 draw_str &no_textbox + + .refresh/etc LDZ #00 EQU ,&no_etc JCN + draw_search_indicator + draw_resize_handle + #00 .refresh/etc STZ + &no_etc .refresh/fg LDZ #00 EQU ,&no_fg JCN clear_fg - draw_resize_handle draw_cursor #00 .refresh/fg STZ &no_fg BRK + +@draw_search_indicator ( -> ) + + .textbox/searching LDZ #00 EQU ,¬hing JCN + ;search_indicator #0000 .Screen/height DEI2 #0008 SUB2 #01 draw_str + JMP2r + ¬hing + #0000 .Screen/x DEO2 + .Screen/height DEI2 #0008 SUB2 .Screen/y DEO2 + ;blank .Screen/addr DEO2 + #01 .Screen/sprite DEO +JMP2r @draw_bone ( -> )@@ -1046,6 +1069,8 @@
JMP2r ( -== data ==- ) + +@search_indicator "$ 00 @search_lbl "SEARCHING: 20 "type 20 "query 20 "and 20 "press 20 "{enter}; 20 "{esc} 20 "to 20 "go 20 "back 00 @refile_lbl "REFILING: 20 "type 20 "destination 20 "and 20 "press 20 "{enter}; 20 "{esc} 20 "to 20 "go 20 "back 00