Add F keybinding to flush the mail queue via postqueue -f
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
9c0ca254f5
commit
9ba845e5f4
3 changed files with 34 additions and 2 deletions
20
msgs.go
20
msgs.go
|
|
@ -1,6 +1,8 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"os/exec"
|
||||
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
)
|
||||
|
||||
|
|
@ -34,6 +36,24 @@ func loadQueueCmd() tea.Cmd {
|
|||
}
|
||||
}
|
||||
|
||||
func flushQueueCmd() tea.Cmd {
|
||||
return func() tea.Msg {
|
||||
exec.Command("postqueue", "-f").Run()
|
||||
entries, err := loadQueue()
|
||||
if err != nil {
|
||||
return queueErrMsg{err}
|
||||
}
|
||||
return queueParsedMsg{entries}
|
||||
}
|
||||
}
|
||||
|
||||
func requeueMessageCmd(id string) tea.Cmd {
|
||||
return func() tea.Msg {
|
||||
exec.Command("postsuper", "-r", id).Run()
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func fetchSubjectCmd(id string) tea.Cmd {
|
||||
return func() tea.Msg {
|
||||
raw, err := fetchHeaders(id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue