~sircmpwn/aerc

ref: 0.3.0 aerc/aerc.go -rw-r--r-- 4.0 KiB
Open mailto links in a new aerc instance if needed.

Aerc tries to open mailto:// links via the socket of the already running aerc
instance.

If no socket exists this silently errored out.
This commit starts up a new aerc instance if it can't connect to the socket
(which I think is the most common error) and if not sets up a new aerc instance
and retries to open the compositor.

This fixes https://todo.sr.ht/~sircmpwn/aerc2/295 by implementing the desired
behaviour.
Add initial command to end of completions

This means that if the user cycles through all completions then they
will see the initial string they entered.
aerc.go: simplify completions
aerc.go: remove unused variable
Close backends prior to shutdown

We need some way to signal the backends that we are about to shutdown,
allowing them to clean up (for example in notmuch committing the db changes).
This commit implements a hook which gets called upon shutdown, providing
backends implement the io.Closer interface.
Remove aerc specific code from the ui

Separatiing the ui code from aerc makes it usable as a library in
other projects.
Print errors from config load issues.

Currently we /dev/null stdout, if it is a tty.
The checkConfigPerms function, as well as the error print were incorrectly
writing to stdout and therefore weren't visible to most users.
Add command history and cycling

Aerc will keep track of the previous 1000 commands, which the user can
cycle through using the arrow keys while in the ex-line. Pressing up
will move backwards in history while pressing down will move forward.
Add new-email trigger

This patch sets up the trigger config section of aerc.conf.

Each trigger has its own function which is called from the place where
it is triggered. Currently only the new-email trigger is implemented.

The triggers make use of format strings. For instance, in the new-email
trigger this allows the user to select the trigger command and also the
information extracted from the command and placed into their command.

To actually execute the trigger commands the keypresses are simulated.

Further triggers can be implemented in the future.

Formatting of the command is moved to a new package.
Discard stdout if not redirected to file

Commit 97bee661 Printf statement at widgets/msgviewer.go#188 introduced
bad formatting in the display if stdout was not being redirected.
Forward mailto links to server via ./aerc <mailto>
Add Unix socket for communicating with aerc
Show usage on getopt.Getopts error
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.
2a096170 — Gregory Mullen 1 year, 5 months ago
Implement basic tab completion support

Tab completion currently only works on commands. Contextual completion
will be added in the future.
Add aerc -v to print the installed version
753adb90 — Kevin Kuehler 1 year, 5 months ago
widget: Add ProvidesMessage interface

Consists of 3 functions
* Store: Access to MessageStore type
* SelectedAccount: Access to Account widget that the target widget
belongs to
* SelectedMessage: Current message (selected in msglist or the one we
are viewing)

Signed-off-by: Kevin Kuehler <keur@ocf.berkeley.edu>
Install default configs to XDG config if not found
Update internal state and draw from the same goroutine

This commit introduces a new Aerc.Tick function that should be called to
refresh the internal state. This in turn makes each AccountView process worker
events.

The UI goroutine repeatedly refreshes the internal state before drawing a new
frame. The reason for this is that many worker messages may need to be
processed for a single frame, and drawing the UI is far slower than refreshing
the internal state. This has been confirmed in my testing (calling Aerc.Tick
only once per frame results in a slower display).

Many synchronization code has been removed. We can now write widgets without
having to care so much about races. The remaining sync users are:

- widgets/spinner: the spinner value is updated from inside an internal
  goroutine
- lib/ui/invalidatable: Invalidate may be called from any goroutine
- lib/ui/grid: same
- lib/ui/ui: an internal goroutine needs read access to UI.exit
- worker/types/worker: Worker.callbacks is used for both worker and UI
  callbacks

The exact goroutine requirements for Drawable have been documented.
Abort if accounts.conf is world readable

Fixes #32
Next