Commit graph

477 commits

Author SHA1 Message Date
Drew DeVault
66a9052f0f Forward mailto links to server via ./aerc <mailto> 2019-07-19 14:34:13 -04:00
Drew DeVault
7a489cb001 Add Unix socket for communicating with aerc 2019-07-19 14:15:48 -04:00
Drew DeVault
b3a66866b9 aerc(1): fix scdoc syntax error 2019-07-19 12:46:52 -04:00
Drew DeVault
2d6338e27d aerc(1): document missing commands 2019-07-19 12:45:10 -04:00
Drew DeVault
7d37a89458 aerc(1): Fix fallback ex key documentation 2019-07-19 12:33:24 -04:00
Kevin Kuehler
f81e4bd41c Implement :filter, :clear
Signed-off-by: Kevin Kuehler <keur@ocf.berkeley.edu>
2019-07-19 11:30:32 -04:00
Drew DeVault
8b2abcb02a Change default attach keybinding 2019-07-19 10:45:44 -04:00
Galen Abell
7899d15d60 Add :attach command for compose
Allow users to add attachments to emails in the Compose view. Syntax is
:attach <path>, where path is a valid file. Attachments will show up in
the pre-send review screen.
2019-07-19 10:30:47 -04:00
Drew DeVault
fe7230bb9a Add :cp alias for :copy 2019-07-17 18:42:03 -04:00
Jeffas
fb124139f3 Add option to always show mimetype in viewer
A user may want to be able to see what mimetype they are viewing, so
that they can determine what program it may be opened in or for some
other reason.

The config option is under the [viewer] section and is called
'always-show-mime'. It defaults to false to preserve the current
behaviour.
2019-07-17 17:34:43 -04:00
Jeffas
4a5aa7dc27 Remove passing of showHeaders explicitly
Where it is needed the configs are already available so just extract the
value from these.
2019-07-17 17:33:31 -04:00
Jeffas
1d1fe7c7ef Ensure new partswitcher doesn't start on multipart 2019-07-17 17:31:49 -04:00
Ben Burwell
6473848d87 maildir: Watch for new messages
When a directory is opened, start watching its "new" subdirectory for
incoming messages using the fsnotify library. When creation events are
detected, run the Unseen routine to move the message from new to cur and
add new UIDs to the store, updating the UI's list of directory contents
as we go.
2019-07-17 17:29:11 -04:00
Daniel Bridges
dfc048fe28 Display user specified headers in viewer if present 2019-07-17 17:26:43 -04:00
Jeffas
d7975132b6 Show currently pressed keys in statusline
This patch adds the currently pressed keys to the statusline. This is
useful when keybindings are multiple keys long and you might forget
which keys are already pressed.
2019-07-17 17:12:52 -04:00
Nicolai Dagestad
a1763bf207 Add an option to toggle between read and unread 2019-07-17 17:01:25 -04:00
Drew DeVault
dbd583c969 Revert "Ensure new partswitcher doesn't start on multipart"
This reverts commit 41390bc3e1.
2019-07-17 16:09:40 -04:00
Jeffas
44a743ed11 Add show-headers to aerc-config 2019-07-17 16:03:42 -04:00
Jeffas
4991c344ab Fix grid widths when using weighted widths
If the column weights do not collectively divide the extent of the grid
layout then some width was not used and so would not be redrawn,
resulting in previous drawings showing through.

This fixes this by checking if there is any remainingExact width and if
there is it is assigned to the weighted columns by their proportion from
left to right.
2019-07-17 16:00:49 -04:00
Jeffas
06af5391a3 Add MouseEnabled config setting
This patch adds the ability to control whether aerc captures mouseevents
or not. By default it will be set to not capture events.
2019-07-17 16:00:44 -04:00
Jeffas
8534720e72 When reviewing an email don't pass characters on
This stops characters being passed to the focused box when reviewing an
email. To edit headers the user should go back to the edit page.
2019-07-17 16:00:02 -04:00
Tuomas Siipola
038bf711fa Fix text input cursor position with non-ASCII text
Fixes #171
2019-07-17 15:59:52 -04:00
Asger Hautop Drewsen
d43684cd90 Show usage on getopt.Getopts error 2019-07-17 15:59:41 -04:00
Jeffas
41390bc3e1 Ensure new partswitcher doesn't start on multipart 2019-07-17 15:59:09 -04:00
Jeffas
715c9a4797 Update status message to include destination 2019-07-17 15:59:08 -04:00
Reto Brunner
1c419d1b4d lowercase all key bindings 2019-07-17 15:58:46 -04:00
Ben Burwell
eb0481b9cc Fix header decoding
Email headers can be encoded with different charsets, which is signalled
using a special character sequence. The go-message package provides two
different methods for accessing header values, Get(key) (actually
inherited from the embedded textproto.Header) which returns the raw
header value and Text(key), which returns the header's value decoded as
UTF-8.

Before, in the maildir backend, we were using the Get method which
sometimes resulted in encoded headers being displayed in the UI. This
patch replaces the incorrect usage of Get() with Text().
2019-07-17 15:58:15 -04:00
Kevin Kuehler
8bb115dbae commands: Don't crash when store is nil
On a slow network connection, running these commands without this guard
will cause aerc to panic.

Signed-off-by: Kevin Kuehler <keur@ocf.berkeley.edu>
2019-07-15 09:46:49 -04:00
Pedro L. Ramos
d85f671bdf 71: Allow user to change config options at runtime
There is a LoadConf and a LoadConfFromFile.
LoadConfFromFile reads the iniFile into memory and and calls
LoadConf, which executes the old parsing commands from
LoadConf (old func).

The remaining of the LoadConfFromFile is the same as the old OldConf.
2019-07-15 09:42:03 -04:00
Drew DeVault
9bf1a0418b Update README.md 2019-07-14 13:53:09 -04:00
EdOverflow
5ea5f914bf Escape plus symbol in hldiff filter.
I was getting errors when using the hldiff filter with aerc
because the plus symbol on line 28 wasn't escaped. This commit
escapes the plus symbol in the regex on line 28.
2019-07-13 12:28:49 -04:00
Drew DeVault
dba16157de Fix missing format fields in maildir/container.go 2019-07-13 11:21:17 -04:00
Drew DeVault
5b2336d0d7 Don't initialize an invalid pty size 2019-07-13 11:13:48 -04:00
Jeffas
b0f25c3e01 Fix read reply flag formatting
The readFlag was displaying wrong and not using combinations of the
flags to decide the string.
2019-07-12 11:27:18 -04:00
Ben Burwell
7a26b48c22 Add maildir docs 2019-07-12 11:26:39 -04:00
Ben Burwell
d15ba24a2f Implement maildir copy
Create a delivery in the destination directory with the content of the
source message.
2019-07-12 11:26:39 -04:00
Ben Burwell
840b5bd633 Handle the invalid "utf8" encoding
See commit 0bfc369eb68a1d34ea0ee983f218e97a14099959 in the go-message
package.
2019-07-12 11:26:39 -04:00
Ben Burwell
1b8b6e218c Add maildir backend worker
Add the initial implementation of a backend for Maildir accounts. Much
of the functionality required is implemented in the go-message and
go-maildir libraries, so we use them as much as possible.

The maildir worker hooks into a new maildir:// URL scheme in the
accounts.conf file which points to a container of several maildir
directories. From there, the OpenDirectory, FetchDirectoryContents, etc
messages work on subdirectories. This is implemented as a Container
struct which handles mapping between the symbolic email folder names and
UIDs to the concrete directories and file names.
2019-07-12 11:09:50 -04:00
Ben Burwell
d7cd35e72b Create UIDStore package
This package can be used to provide a source for mapping mock UIDs back
to relevant keys for alternate backends. For example, for the Maildir
backend, we need to map between UID and message file names.
2019-07-12 11:09:47 -04:00
Jeffas
3b09c07e7a Add clickable tabs
This introduces a new interface `Clickable`. I'd imagine this would be
implemented for most widgets eventually and would allow for programs run
in the terminal to also have their mouse events forwarded to them.

For the tabs it was relatively simple to check that the position of the
click is within the boxes for the tabs. For other components I'd imagine
that some state representing their currently drawn bounding box would be
useful.
2019-07-11 19:45:53 -04:00
Eyal Sawady
4c7f81d20d Don't bind $noinherit
Fixes #112

Signed-off-by: Eyal Sawady <eyalsawady@gmail.com>
2019-07-11 19:44:07 -04:00
Daniel Bridges
06da4512b9 #190 Handle gmail duplicate folder 2019-07-11 19:38:40 -04:00
Jeffas
0b3aca4167 Add backtab to tutorial navigation
This allows users to use backtab (Shift+tab) to go back through the
fields in the tutorial, like C-K. This then mimics the other methods in
having a forward and backward variant.

Also documented this in the wizard help paragraph.
2019-07-11 19:38:12 -04:00
Frode Aannevik
b0eaf5191c Support imaps with oauthbearer authentication (Gmail)
imaps+oauthbearer://user:token@host?token_endpoint=...

 - the config Source password is used as access token if
   no token_endpoint parameter is set
 - the config Source password is used as refresh token if
   token_endpoint parameter is set, and used to exchange
   with an access token

The implementation has only been tested with Gmail.

    source = imaps+oauthbearer://{username}:{refersh_token}@imap.gmail.com:993? \
    client_id=XX&\
    client_secret=XX&\
    token_endpoint=https%3A%2F%2Faccounts.google.com%2Fo%2Foauth2%2Ftoken

client credentials created with

    https://console.developers.google.com/apis/credentials

refresh token created with

    https://github.com/google/gmail-oauth2-tools/blob/master/python/oauth2.py

rel: https://todo.sr.ht/~sircmpwn/aerc2/42
2019-07-11 19:36:14 -04:00
Daniel Bridges
217e85a55d Fix crashes when operating on empty folder (#216) 2019-07-10 13:21:38 -04:00
Drew DeVault
3f30c27bb3 Fix :pipe -b actually writing to stdin 2019-07-08 18:50:40 -04:00
Drew DeVault
133085b436 Fix re-opening of expired pipe tabs 2019-07-08 18:32:31 -04:00
Drew DeVault
6797f93476 :exec, :pipe: show exit status on completion 2019-07-08 18:22:41 -04:00
Drew DeVault
e1152b6a13 aerc(1): correct error with :pipe documentation 2019-07-08 18:19:43 -04:00
Drew DeVault
7ecc6f96de Add :exec and :pipe -b(ackground) 2019-07-08 18:19:08 -04:00