aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix tabstrip over-drawing when not enough spaceJeffas2019-07-261-1/+8
| | | | | | | | Tabstrip didn't take into account the width of the context. Now, it just shows as many tabs as can fit and truncates the last one if necessary. In future it probably would be best to ensure that the selected tab is rendered on the screen.
* Add tab completion to textinputsJeffas2019-07-261-10/+74
| | | | | | | | | | | | | This adds tab completion to textinput components. They can be configured with a completion function. This function is called when the user presses <tab>. The first completion is initially shown to the user inserted into the text. Repeated presses of <tab> or <backtab> cycle through the completions list. The completions list is invalidated when any other non-tab-like key is pressed. Also changed is some logic for current completion generation so that all available commands are returned when <tab> is pressed with no current text and similarly for arguments of commands.
* Fix invalid tab state when deselecting removed tabDrew DeVault2019-07-261-1/+1
|
* Add command history and cyclingGalen Abell2019-07-261-0/+13
| | | | | | 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.
* Move msgstore map to dirstoreJeffas2019-07-261-2/+13
| | | | | | This map represents a mapping from directory names to their associated messagestores anyway so they should be under dirstore. This simply moves them there and adds some methods required to interact with them.
* Add new-email triggerJeffas2019-07-262-19/+58
| | | | | | | | | | | | | | | | | 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.
* Fix :close on terminal panicJeffas2019-07-251-0/+5
| | | | | | | | Executing :close on a terminal would panic due to it already having been removed. This is also related to the fact that removing a tab doesn't check for whether it actually found a tab to remove or not.
* Fix grid creating too large subcontextsJeffas2019-07-251-0/+9
| | | | | | | | The grid was not checking there was enough space for the cells so would just attempt to create subcontexts that don't actually fit. This attempts to use the remaining space and then if there is no space then it just skips drawing this cell.
* Fix panic when tabs.popHistory is nonexistentDrew DeVault2019-07-251-1/+1
|
* Make :next-result :prev-result relative to cursorKevin Kuehler2019-07-251-0/+9
| | | | Signed-off-by: Kevin Kuehler <keur@ocf.berkeley.edu>
* Add change tab commandJeffas2019-07-231-5/+20
| | | | | | | | | | This command allows the user to change tab by giving the tab name. This can be tab completed too. The previous tab is stored in the tabs module so that when a new tab is created it is still possible to go to the previous one. Normal invocation is :ct folder Previous tab is :ct -
* Forward mailto links to server via ./aerc <mailto>Drew DeVault2019-07-191-0/+17
|
* Add Unix socket for communicating with aercDrew DeVault2019-07-191-0/+82
|
* Implement :filter, :clearKevin Kuehler2019-07-191-14/+33
| | | | Signed-off-by: Kevin Kuehler <keur@ocf.berkeley.edu>
* Display user specified headers in viewer if presentDaniel Bridges2019-07-171-0/+14
|
* Fix grid widths when using weighted widthsJeffas2019-07-171-3/+14
| | | | | | | | | | 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.
* Add MouseEnabled config settingJeffas2019-07-171-1/+3
| | | | | This patch adds the ability to control whether aerc captures mouseevents or not. By default it will be set to not capture events.
* Fix text input cursor position with non-ASCII textTuomas Siipola2019-07-171-3/+3
| | | | Fixes #171
* Fix read reply flag formattingJeffas2019-07-121-5/+19
| | | | | The readFlag was displaying wrong and not using combinations of the flags to decide the string.
* Create UIDStore packageBen Burwell2019-07-121-0/+62
| | | | | | 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.
* Add clickable tabsJeffas2019-07-113-0/+36
| | | | | | | | | | | 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.
* #190 Handle gmail duplicate folderDaniel Bridges2019-07-111-0/+2
|
* Support imaps with oauthbearer authentication (Gmail)Frode Aannevik2019-07-111-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix re-opening of expired pipe tabsDrew DeVault2019-07-081-1/+13
|
* Factor IMAP-specific structs out of UI modelsBen Burwell2019-07-082-66/+20
| | | | | | | Before, we were using several IMAP-specific concepts to represent information being displayed in the UI. Factor these structures out of the IMAP package to make it easier for other backends to provide the required information.
* Use []uint32 instead of imap.SeqSetBen Burwell2019-07-081-25/+11
| | | | | | | | A sequence-set is an IMAP-specific implementation detail. Throughout the UI, aerc simply operates using lists of opaque identifiers. In order to loosen the coupling between the UI and IMAP in particular, replace most usages of imap.SeqSet with []uint32, leaving the translation to a SeqSet to the IMAP backend as needed.
* Factor UI models out of the worker message packageBen Burwell2019-07-082-20/+21
| | | | | | | | Before, the information needed to display different parts of the UI was tightly coupled to the specific messages being sent back and forth to the backend worker. Separating out a models package allows us to be more specific about exactly what a backend is able to and required to provide for the UI.
* Sort out dirstore once and for allDrew DeVault2019-07-041-3/+1
|
* Use go-message implementation of GenerateMessageIDBen Burwell2019-07-041-34/+0
| | | | | Now that this is available in the upstream, we no longer need to maintain a parallel implementation.
* Use "open" instead of "xdg-open" on Darwin systemsBen Burwell2019-07-042-0/+22
|
* panic: runtime error: index out of range in handleFetchMessages (#127)Zach Sisco2019-06-291-3/+1
|
* Add new lib/dirstore to source completions fromGregory Mullen2019-06-291-0/+20
|
* Implement basic tab completion supportGregory Mullen2019-06-291-0/+8
| | | | | Tab completion currently only works on commands. Contextual completion will be added in the future.
* Implement :search, :next-result, :prev-resultDrew DeVault2019-06-261-1/+49
|
* Ensure that flags are set properlyAditya Mahajan2019-06-161-2/+4
| | | | | | | | | | The current implementation has three classes of flags: - readFlag - delFlag - flaggedFlag The logic to check for them should be in parallel if branches rather than in sequential if-else ladder.
* lib/ui/tab: Add Replace methodKevin Kuehler2019-06-111-0/+16
| | | | | | Also expose a light wrapper method in aerc.go for tab replacement Signed-off-by: Kevin Kuehler <kkuehler@brave.com>
* Move select functionality from msglist to msgstoreKevin Kuehler2019-06-111-0/+41
| | | | | | Remove msglist Next and Prev commands Signed-off-by: Kevin Kuehler <kkuehler@brave.com>
* Add :read and :unread commandsDrew DeVault2019-06-091-0/+14
|
* Update our message flags when server updates themDrew DeVault2019-06-091-3/+1
|
* Add archive commandRobert Günzler2019-06-091-2/+15
| | | | | | | | | | | | | | | Adds an archive command that moves the current message into the folder specified in the account config entry. Supports three layouts at this point: - flat: puts all messages next to each other - year: creates a folder per year - month: same as above, plus folders per month This also adds a "-p" argument to "cp" and "mv" that works like "--parents" on mkdir(1). We use this to auto-create the directories for the archive layout.
* msglist: use distinct style for unread emailsYash Srivastav2019-06-081-5/+5
|
* Message list: implement index-format optionYash Srivastav2019-06-072-0/+271
|
* Fix #1160.1.0Drew DeVault2019-06-031-1/+1
|
* Add Tabs historyReto Brunner2019-06-021-4/+34
| | | | Fixes #77: When closing a tab, bring you back to the one you last had focused
* ensureScroll on text input framesDrew DeVault2019-05-251-0/+2
|
* Implement scrolling in text inputDrew DeVault2019-05-251-3/+31
|
* Show account wizard if no accounts configuredDrew DeVault2019-05-221-1/+1
|
* New account wizard, part oneDrew DeVault2019-05-212-10/+23
|
* Flesh out multipart switcherDrew DeVault2019-05-201-1/+1
|
* lib/ui/ui: use atomic instead of channelSimon Ser2019-05-191-26/+21
| | | | | | | | | This makes it so an atomic `invalid` value is used instead of an unbuffered channel. When many invalidations kick in, a lot of values were sent to the channel. (Since OnInvalidate's callback can be run in any goroutine, we need to be careful about races here.)