summaryrefslogtreecommitdiff
path: root/aerc.go
AgeCommit message (Collapse)Author
2022-04-27refactor: refactor pgp implementationTim Culverhouse
This commit refactors the internal PGP implementation to make way for GPG integration. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
2022-04-14main: remove unnecessary pointer dereferenceConnor Kuehl
Calling a method on a pointer will dereference it automatically. Signed-off-by: Connor Kuehl <cipkuehl@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
2022-03-24logging: fix race condition in startupMoritz Poldrack
If a panic occurs in one of the workers, it can happen after the UI was initialised, but before the cleanup function has been registered. With this the start of the worker loops is deferred until the cleanup routine was registered. Signed-off-by: Moritz Poldrack <git@moritz.sh>
2022-03-23logging: added a log on panicMoritz Poldrack
Since panics still regularly "destroy" the terminal, it is hard to get a stack trace for panics you do not anticipate. This commit adds a panic handler that automatically creates a logfile inside the current working directory. It has to be added to every goroutine that is started and will repair the terminal on a panic. Signed-off-by: Moritz Poldrack <git@moritz.sh> Acked-by: Robin Jarry <robin@jarry.cc>
2022-02-20main: use terminfo to set window titleRobin Jarry
Parse the terminal capabilities from the TERM environment variable instead of using a hard coded list of terminals. tcell does not expose the status line capabilities. Use another library for this: github.com/xo/terminfo Signed-off-by: Robin Jarry <robin@jarry.cc>
2022-02-19config: do not hardcode sharedirRobin Jarry
Instead of using a static SHAREDIR at compile time, use a list of standard paths to use at runtime for templates, config files and stylesets. This implies removing all default filters in the default configuration. Replace them with basic commands. New users can configure the filters as they wish. Signed-off-by: Robin Jarry <robin@jarry.cc>
2022-01-24aerc: shutdown if socket communication failsAdnan Maolood
When provided with a mailto argument, aerc tries to connect to an existing instance via a unix socket. If that fails, it starts up a new instance and tries again. However, if that fails again (e.g. if the unix server could not be started) then the new instance will remain open without any indication that an error occured. Instead, shutdown the new instance so the user can see the error message.
2022-01-24binds: Warning on unexistent account bindingsinwit
After commit 175d0ef ("binds: add account specific bindings"), when bindings are defined for an account not defined in accounts.conf, aerc quits with an error. After this commit, a warning is logged and aerc ignores those bindings. Signed-off-by: inwit <inwit@sindominio.net>
2021-11-05go.mod: change base git urlRobin Jarry
I'm not sure what are the implications but it seems required. Link: https://github.com/golang/go/issues/20883 Signed-off-by: Robin Jarry <robin@jarry.cc>
2021-11-02main: set xterm titleRobin Jarry
Signed-off-by: Robin Jarry <robin@jarry.cc>
2021-02-11aerc: try to recover from a panicReto Brunner
As of now we crash fairly often. The problem is that we didn't run the cleanup routine of the ui in this case, leaving the pty in a bad state. Instead, recover from a panic and at least try to run the ui deinit.
2020-06-13Sort command completionsJeffas
Previously the completions weren't sorted which led to a difficult to navigate list, especially for the command names as it would randomly jump through the alphabet.
2020-05-06templates: add version funcReto Brunner
Fixes #316
2020-03-03Initial support for PGP decryption & signaturesDrew DeVault
2019-12-21Don't use current input as a possible completionBen Burwell
Now that completions are being shown in the popover, it doesn't make sense to show the unfinished command as a potential completion.
2019-09-29Open mailto links in a new aerc instance if needed.Reto Brunner
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.
2019-09-11Add initial command to end of completionsJeffas
This means that if the user cycles through all completions then they will see the initial string they entered.
2019-09-04aerc.go: simplify completionsDrew DeVault
2019-09-04aerc.go: remove unused variableDrew DeVault
2019-08-08Close backends prior to shutdownReto Brunner
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.
2019-08-03Remove aerc specific code from the uiNicolai Dagestad
Separatiing the ui code from aerc makes it usable as a library in other projects.
2019-07-29Print errors from config load issues.Reto Brunner
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.
2019-07-26Add command history and cyclingGalen Abell
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.
2019-07-26Add new-email triggerJeffas
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.
2019-07-23Discard stdout if not redirected to fileDaniel Bridges
Commit 97bee661 Printf statement at widgets/msgviewer.go#188 introduced bad formatting in the display if stdout was not being redirected.
2019-07-19Forward mailto links to server via ./aerc <mailto>Drew DeVault
2019-07-19Add Unix socket for communicating with aercDrew DeVault
2019-07-17Show usage on getopt.Getopts errorAsger Hautop Drewsen
2019-07-1571: Allow user to change config options at runtimePedro L. Ramos
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-06-29Implement basic tab completion supportGregory Mullen
Tab completion currently only works on commands. Contextual completion will be added in the future.
2019-06-18Add aerc -v to print the installed versionDrew DeVault
2019-06-02widget: Add ProvidesMessage interfaceKevin Kuehler
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>
2019-05-22Install default configs to XDG config if not foundDrew DeVault
2019-05-19Update internal state and draw from the same goroutineSimon Ser
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.
2019-05-17s/aerc2/aerc/gDrew DeVault
2019-05-16Abort if accounts.conf is world readableReto Brunner
Fixes #32
2019-05-16Revert "Abort if accounts.conf is world readable"Drew DeVault
This reverts commit a755608ef9d5893b68dc4c774bbda06503481552.
2019-05-16Abort if accounts.conf is world readableReto Brunner
Fixes #32
2019-05-12Implement :{next,prev}-field in compose viewDrew DeVault
2019-05-12Add initial compose widgetDrew DeVault
2019-05-05lib/ui: fix UI.Exit race conditionSimon Ser
UI.Exit can be accessed from goroutines drawing, goroutines executing commands and goroutines waiting for events. Write at 0x00c0002b2040 by main goroutine: main.main.func1() /home/simon/src/aerc2/aerc.go:76 +0x33d git.sr.ht/~sircmpwn/aerc2/widgets.(*Aerc).BeginExCommand.func1() /home/simon/src/aerc2/widgets/aerc.go:245 +0x89 git.sr.ht/~sircmpwn/aerc2/widgets.(*ExLine).Event() /home/simon/src/aerc2/widgets/exline.go:131 +0x442 git.sr.ht/~sircmpwn/aerc2/widgets.(*Aerc).Event() /home/simon/src/aerc2/widgets/aerc.go:116 +0x83c git.sr.ht/~sircmpwn/aerc2/widgets.(*Aerc).simulate() /home/simon/src/aerc2/widgets/aerc.go:109 +0x12a git.sr.ht/~sircmpwn/aerc2/widgets.(*Aerc).Event() /home/simon/src/aerc2/widgets/aerc.go:142 +0x722 git.sr.ht/~sircmpwn/aerc2/lib/ui.(*UI).Tick() /home/simon/src/aerc2/lib/ui/ui.go:75 +0x33f main.main() /home/simon/src/aerc2/aerc.go:94 +0x497 Previous read at 0x00c0002b2040 by goroutine 19: git.sr.ht/~sircmpwn/aerc2/lib/ui.Initialize.func1() /home/simon/src/aerc2/lib/ui/ui.go:45 +0x97 Goroutine 19 (running) created at: git.sr.ht/~sircmpwn/aerc2/lib/ui.Initialize() /home/simon/src/aerc2/lib/ui/ui.go:44 +0x372 main.main() /home/simon/src/aerc2/aerc.go:87 +0x3a9
2019-03-30Add message view commands, :closeDrew DeVault
2019-03-30Add basic message viewer mockupDrew DeVault
2019-03-21Add terminal command contextDrew DeVault
2019-03-21Add context-specific commandsDrew DeVault
2019-03-15Add :quit commandDrew DeVault
2019-03-10Start building out command subsystemDrew DeVault
2019-01-13Add basic account widget, populate real acct viewsDrew DeVault
2018-03-02Switch to vgoDrew DeVault