Add initial compose widget
This commit is contained in:
parent
c05e5f73f2
commit
577248f5e1
7 changed files with 169 additions and 3 deletions
commands/account
28
commands/account/compose.go
Normal file
28
commands/account/compose.go
Normal file
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue