aboutsummaryrefslogtreecommitdiff
path: root/widgets
AgeCommit message (Collapse)Author
2019-09-04all: purge redundant underscoresWagner Riffel
Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
2019-09-02Use sort.Stable for sorting displayed messagesa3v
With sort.Sort, sometimes two messages with the same timestamp will switch places every time the message list is redrawn
2019-08-30Allow custom spinner via config filePaul Spooren
Allows to set `ui.spinner=` to a string which is then split by `ui.spinner-delimiter=` (Default: comma) instead of having a hard coded animation. This implementation doesn't use INIs capabilities to split strings as it trims whitespaces breaking the default animation. Signed-off-by: Paul Spooren <mail@aparcar.org>
2019-08-29Fix out-of-order messages by sorting as we displayStephen Brennan
Sometimes I observe out-of-order messages when using a maildir inbox. It appears that the UIDs for these messages are returned out of order by the MessageStore. In order for a maildir MessageStore to return messages in most recently received order, it must have already opened all messages and parsed the date to use as a sort key. Rather than implement that, simply sort messages by time as we display. This fix shows my emails in order.
2019-08-26Add :prompt commandChristopher Vittal
Usage: :prompt <prompt> <command...> Displays the prompt on the status bar, waits for user input, then appends that input as the last argument to the command and executes it. The input is passed as one argument to the command, unless it is empty, in which case no extra argument is added.
2019-08-20Only compile regex portion of folder filterDaniel Xu
The code was trying to compile the `~` as well. In this case, it was trying to match a literal `~` to the front of the supplied regex. Fixes: 334ca89bea381 ("folder filter: only assume regex if filter is ~fmt") Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
2019-08-20folder filter: only assume regex if filter is ~fmtDrew DeVault
2019-08-20Add forwarding as attachment featureJelle Besseling
This allows a single message to be forward as attachment with the :forward -a command
2019-08-20Add addresses argument to forward commandJelle Besseling
2019-08-19Add support for <C-j> as '<Enter>' in ExLineChristopher Vittal
2019-08-19Support regex filters for foldersDaniel Xu
It's nice to be able to filter the folders displayed in the side bar. Basic string matching can get verbose with enough folders whitelisted. Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
2019-08-13Revert "add close command at global level"Drew DeVault
This reverts commit f0a0c5aa733fa66958c113465bfc5fdd3d7cc9f0.
2019-08-13add close command at global levelAditya Srivastava
2019-08-12Prevent drawing terminal with nil cmdDrew DeVault
2019-08-12Ignore scroll command when msgstore is nilJelle Besseling
Fixes ~sircmpwn/aerc2#205. Many functions do a nil check on the store, so this changes Store() so it returns nil when msglist is nil. It also places the Scroll() behind the nil check in the next-message command. https://todo.sr.ht/~sircmpwn/aerc2/205
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-07Implement next-folder using NextPrev with amountJelle Besseling
This fixes ~sircmpwn/aerc2#182 https://todo.sr.ht/~sircmpwn/aerc2/182
2019-08-07Allow cc/bcc command to receive no argumentsDaniel Bridges
2019-08-07cc/bcc: Append to existing headers if called twiceKevin Kuehler
Signed-off-by: Kevin Kuehler <keur@ocf.berkeley.edu>
2019-08-03Fixing #231 (alternative preferred mimetypes)Ben Cohen
2019-08-03Add cc and bcc commandsDaniel Bridges
2019-08-02Fix sending attachments with less than 512 bytesBen Burwell
2019-08-02Include body MIME terminator in multipart messagesBen Burwell
Before, the text/plain part of the multipart MIME message was not being correctly terminated with its boundary. The multipart writer writes the terminator when its Close is called, but since the call to Close() was deferred, it was not being called until after the attachments were being written resulting in the boundary not being included at all.
2019-08-02msglist: add initialization stateReto Brunner
Make the msglist aware of whether we are still initializing or not. We never stopped spinning the msglist if we didn't get any Directories back from types.ListDirectories. With this change, we can set the init state from the account and display the spinner only if we don't know whether we have directories or not and else the "no messages" string from the config.
2019-07-29Ring bell when new messages arrive0.2.0Ben Burwell
Add a "new-message-bell" option to the UI section of aerc.conf. A new hook into the message store allows the msglist widget to detect new messages being added to the displayed list. When new messages are delivered, and the new-message-bell option is enabled (as it is by default), the terminal will beep.
2019-07-27Add index option to change-tabJeffas
This allows selection of a tab using its index. It attempts to parse the given argument as a number, if it fails then it uses it as a name. Also supports relative indexes using prefixed + or -.
2019-07-27Add :detach commandGalen Abell
Add a command for removing attachments from a composed message. Syntax is :detach [path], with path being an optional argument specifying the path of one existing attachment. If no path is specified, the first attachment is removed.
2019-07-27Fix review message not filling entire spaceGalen Abell
Adding an attachment, switching to a different tab, and switching back to the review message caused the "filled space" in the review message to disappear, since there was one too many rows in the layout.
2019-07-26Add tab completion to textinputsJeffas
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.
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-26Support configurable header layout in compose widgetDaniel Bridges
2019-07-26Move msgstore map to dirstoreJeffas
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.
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-25Show the directory being selected in grayJeffas
2019-07-23Add change tab commandJeffas
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 -
2019-07-19Fix alternatives configDrew DeVault
2019-07-19Add [a]ttach to the review message promptsDrew DeVault
2019-07-19Add Unix socket for communicating with aercDrew DeVault
2019-07-19Implement :filter, :clearKevin Kuehler
Signed-off-by: Kevin Kuehler <keur@ocf.berkeley.edu>
2019-07-19Add :attach command for composeGalen Abell
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-17Add option to always show mimetype in viewerJeffas
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-17Remove passing of showHeaders explicitlyJeffas
Where it is needed the configs are already available so just extract the value from these.
2019-07-17Ensure new partswitcher doesn't start on multipartJeffas
2019-07-17Display user specified headers in viewer if presentDaniel Bridges
2019-07-17Show currently pressed keys in statuslineJeffas
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-17Revert "Ensure new partswitcher doesn't start on multipart"Drew DeVault
This reverts commit 41390bc3e1e557eff15e8159767f206b3b74ea30.
2019-07-17When reviewing an email don't pass characters onJeffas
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-17Ensure new partswitcher doesn't start on multipartJeffas
2019-07-13Don't initialize an invalid pty sizeDrew DeVault
2019-07-11Add clickable tabsJeffas
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.