aboutsummaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-05-12 00:06:09 -0400
committerDrew DeVault <sir@cmpwn.com>2019-05-12 00:06:09 -0400
commit577248f5e15d98a9a6522a605acd434059582bfc (patch)
tree890e305c723c4c21c9fba071571ee0d010be1183 /commands
parentc05e5f73f29566812b7623311db8c6196c7be063 (diff)
downloadaerc-577248f5e15d98a9a6522a605acd434059582bfc.tar.gz
Add initial compose widget
Diffstat (limited to 'commands')
-rw-r--r--commands/account/compose.go28
1 files changed, 28 insertions, 0 deletions
diff --git a/commands/account/compose.go b/commands/account/compose.go
new file mode 100644
index 00000000..15fc3549
--- /dev/null
+++ b/commands/account/compose.go
@@ -0,0 +1,28 @@
+package account
+
+import (
+ "errors"
+
+ "github.com/mattn/go-runewidth"
+
+ "git.sr.ht/~sircmpwn/aerc2/widgets"
+)
+
+func init() {
+ register("compose", Compose)
+}
+
+// TODO: Accept arguments for default headers, message body
+func Compose(aerc *widgets.Aerc, args []string) error {
+ if len(args) != 1 {
+ return errors.New("Usage: compose")
+ }
+ // TODO: Pass along the sender info
+ composer := widgets.NewComposer()
+ // TODO: Change tab name when message subject changes
+ aerc.NewTab(composer, runewidth.Truncate(
+ "New email", 32, "…"))
+ return nil
+}
+
+