aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/compose.go
Commit message (Collapse)AuthorAgeFilesLines
* go.mod: change base git urlRobin Jarry2021-11-051-7/+7
| | | | | | | 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>
* view,compose: use border color to separate headers from bodyRobin Jarry2021-10-281-1/+2
| | | | | | | | | | When composing a message, there is an empty fill line between the headers and the text editor. The line is printed with the default style which may cause users to assume it is part of the editor. Display the fill lines with the border color to avoid confusion. Signed-off-by: Robin Jarry <robin@jarry.cc>
* compose: apply default style to header separatorEyal Sawady2021-01-141-3/+3
|
* update tcell to v2 and enable TrueColor supporty0ast2020-12-181-1/+1
| | | | | | | | | Also update to the tcell v2 PaletteColor api, which should keep the chosen theme of the user intact. Note, that if $TRUECOLOR is defined and a truecolor given, aerc will now stop clipping the value to one of the theme colors. Generally this is desired behaviour though.
* Use extensions for querying the mime type of attachmentsReto Brunner2020-12-151-8/+16
| | | | | This gets rid of the issue that lots of things are detected as zip files, even though they are a more specialized format (say office files)
* compose: use a proper header instead of a string mapReto Brunner2020-11-141-123/+165
| | | | | | | | | | | | | Prior to this commit, the composer was based on a map[string]string. While this approach was very versatile, it lead to a constant encoding / decoding of addresses and other headers. This commit switches to a different model, where the composer is based on a header. Commands which want to interact with it can simply set some defaults they would like to have. Users can overwrite them however they like. In order to get access to the functions generating / getting the msgid go-message was upgraded.
* rename header to heditorsReto Brunner2020-11-141-6/+6
|
* Implement style configuration.Kalyan Sriram2020-08-061-29/+39
| | | | | | Introduce the ability to configure stylesets, allowing customization of aerc's look (color scheme, font weight, etc). Default styleset is installed to /path/to/aerc/stylesets/default.
* Revert "Implement style configuration."Reto Brunner2020-07-301-39/+29
| | | | This reverts commit 1ff687ca2b0821c2cacc1fa725abb3302d2af9da.
* Implement style configuration.Kalyan Sriram2020-07-301-29/+39
| | | | | | Introduce the ability to configure stylesets, allowing customization of aerc's look (color scheme, font weight, etc). Default styleset is installed to /path/to/aerc/stylesets/default.
* Make grid sizes dynamicJeffas2020-06-091-8/+13
| | | | | | | | | The grid used static sizes which meant that changing settings didn't have an effect on elements of the ui, notably the sidebar width. This patch makes the `Size` parameter of a cell a function which returns the `int`, allowing for dynamic sizes. A `Const` function is also included for ease of use for static sizes.
* Revert "Add Style configuration"Drew DeVault2020-05-281-40/+29
| | | | This reverts commit 0f78f06610c0e8887aba2ae50e99b86477a384b3.
* Revert "Remove duration from the status methods"Drew DeVault2020-05-281-2/+3
| | | | This reverts commit f06d683688e3d2139b14f67b7e349089e7200bf4.
* Remove duration from the status methodsReto Brunner2020-05-271-3/+2
| | | | We always set 10 seconds anyhow, might as well do that without repeating ourselfs.
* Add Style configurationReto Brunner2020-05-271-29/+40
| | | | | | | | | | The following functionalities are added to configure aerc ui styles. - Read stylesets from file with very basic fnmatch wildcard matching - Add default styleset - Support different stylesets as part of UiConfig allowing contextual styles. - Move widgets/ui elements to use the stylesets. - Add configuration manual for the styleset
* Set AnsweredFlag on successful replySrivathsan Murali2020-05-251-0/+9
|
* Add recall commandJeffas2020-04-241-1/+1
| | | | | | This command allows recalling the selected postponed email to edit in the composer. The command only allows recalling from the postpone directory.
* Add postpone commandJeffas2020-04-241-19/+25
| | | | | | | This command uses the Postpone folder from the account config to save messages to. Messages are saved as though they were sent so have a valid 'to' recipient address and should be able to be read back in for later editing.
* Remove ability to specify headers in the editorReto Brunner2020-04-241-147/+42
| | | | | | | | | | Due to headers being essentially free text, we constantly run into issues with parts of the body being interpreted as headers. Remove the ability to overwrite headers to avoid that, while keeping the ability to specify headers in the template files. Fixes #383
* compose: add space between headers and editorDrew DeVault2020-03-031-3/+5
| | | | Until the PGP changes, this was merged into the header widget.
* Correct spellingReto Brunner2020-01-161-1/+1
|
* remove Original* checkLeszek Cimała2020-01-091-2/+1
|
* create OriginalMail structLeszek Cimała2020-01-091-2/+3
|
* Add address book completion in composerBen Burwell2019-12-211-3/+20
| | | | | Complete email address fields in the message composer with an external address book command, compatible with mutt's query_cmd.
* Composer: fix EOF errorsDrew DeVault2019-12-121-6/+10
| | | | | PrepareHeaders generated a fresh message ID and Date header every time. This instead generates those headers in advance.
* remove garbage headers in reply messageLeszek Cimała2019-12-081-1/+2
| | | | | | Very important fix. Remove garbage from reply message headers. Till now all Original fields were send in reply, which we do not want and could lead to uncorrect email message.
* Parse headers from templateRobert Günzler2019-12-071-3/+50
| | | | | | | | | | | This patch parses the processed template for headers and populates matching header editors. Those are then stripped from the template body before prepending the template and remaining header fields to the composer content. The main motivation for this is keeping receiver, sender and subject lines in the template file and generating the message subject from the date.
* Revert "Parse headers from template"Drew DeVault2019-12-041-39/+3
| | | | This reverts commit 31e3e9f56e0b8123f0238537112496b407055aef.
* Parse headers from templateRobert Günzler2019-12-041-3/+39
| | | | | | | | | | | Parse the processed template for headers and populates matching header editors accordingly. Those are then stripped from the template body before prepending it and remaining header fields to the composer content. The motivation for this is keeping receiver, sender and subject lines in the template file and generating the message subject with the date functions.
* Allow fields in compose widget to be clickedGreg Anders2019-11-171-2/+32
| | | | | When the mouse is enabled, clicking on a header field switches focus to that field (likewise for the terminal).
* Add some defaults for template optionsDrew DeVault2019-11-101-2/+4
|
* Add Templates with ParsingSrivathsan Murali2019-11-101-3/+34
| | | | | | | | | | | | | | | + Changes NewComposer to return error. + Add lib to handle templates using "text/template". + Add -T option to following commands - compose. - reply - forward + Quoted replies using templates. + Forwards as body using templates + Default templates are installed similar to filters. + Templates Config in aerc.conf. - Required templates are parsed while loading config. + Add aerc-templates.7 manual for using template data.
* Add signaturesJeffas2019-09-121-1/+65
| | | | | | | | | | | | | This adds the ability for per-account signatures in the accounts.conf config file. The signature is added to emails in the editor at the bottom of the email. This includes when forwarding, replying to, and composing emails. There are two config options: signature-file and signature-cmd. The former allows a signature to be read from a file and the latter allows an arbitrary command to be executed to return the signature. The config options have been documented in aerc-config
* Add MouseableJeffas2019-09-111-4/+17
| | | | | | | | | | | | | | | | | | | | | | This adds the Mouseable interface. When this is implemented for a component that item can accept and process mouseevents. At the top level when a mouse event is received it is passed to the grid's handler and then it trickles down until it reaches a component that can actually handle it, such as the tablist, dirlist or msglist. A mouse event is passed so that components can handle other things such as scrolling with the mousewheel. The components themselves then perform the necessary actions. Clicking emails in the messagelist opens them in a new tab. Textinputs can be clicked to position the cursor inside them. Mouseevents are not forwarded to the terminal at the moment. Elements which do not handle mouse events are not required to implement the Mouseable interface.
* widgets: rewrite references to os.SET_SEEK to io.SeekStartWagner Riffel2019-09-041-4/+4
| | | | | | | Os.SET_SEEK is deprecated, it's recommended to use contants from io package Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
* Add forwarding as attachment featureJelle Besseling2019-08-201-0/+9
| | | | | This allows a single message to be forward as attachment with the :forward -a command
* Add addresses argument to forward commandJelle Besseling2019-08-201-0/+7
|
* Allow cc/bcc command to receive no argumentsDaniel Bridges2019-08-071-0/+17
|
* cc/bcc: Append to existing headers if called twiceKevin Kuehler2019-08-071-1/+6
| | | | Signed-off-by: Kevin Kuehler <keur@ocf.berkeley.edu>
* Add cc and bcc commandsDaniel Bridges2019-08-031-14/+44
|
* Fix sending attachments with less than 512 bytesBen Burwell2019-08-021-1/+1
|
* Include body MIME terminator in multipart messagesBen Burwell2019-08-021-23/+30
| | | | | | | | 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.
* Add :detach commandGalen Abell2019-07-271-0/+20
| | | | | | | 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.
* Fix review message not filling entire spaceGalen Abell2019-07-271-1/+1
| | | | | | 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.
* Add command history and cyclingGalen Abell2019-07-261-2/+7
| | | | | | 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.
* Support configurable header layout in compose widgetDaniel Bridges2019-07-261-113/+138
|
* Add [a]ttach to the review message promptsDrew DeVault2019-07-191-1/+1
|
* Add Unix socket for communicating with aercDrew DeVault2019-07-191-0/+7
|
* Add :attach command for composeGalen Abell2019-07-191-17/+129
| | | | | | 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.
* When reviewing an email don't pass characters onJeffas2019-07-171-1/+4
| | | | | 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.