Implement style configuration.

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.
This commit is contained in:
Kalyan Sriram 2020-07-27 01:03:55 -07:00 committed by Reto Brunner
parent 1bab1754f0
commit 1ff687ca2b
30 changed files with 1040 additions and 292 deletions
commands

View file

@ -7,8 +7,6 @@ import (
"time"
"git.sr.ht/~sircmpwn/aerc/widgets"
"github.com/gdamore/tcell"
)
type ExecCmd struct{}
@ -35,14 +33,15 @@ func (ExecCmd) Execute(aerc *widgets.Aerc, args []string) error {
if err != nil {
aerc.PushError(" " + err.Error())
} else {
color := tcell.ColorDefault
if cmd.ProcessState.ExitCode() != 0 {
color = tcell.ColorRed
aerc.PushError(fmt.Sprintf(
"%s: completed with status %d", args[0],
cmd.ProcessState.ExitCode()))
} else {
aerc.PushStatus(fmt.Sprintf(
"%s: completed with status %d", args[0],
cmd.ProcessState.ExitCode()), 10*time.Second)
}
aerc.PushStatus(fmt.Sprintf(
"%s: completed with status %d", args[0],
cmd.ProcessState.ExitCode()), 10*time.Second).
Color(tcell.ColorDefault, color)
}
}()
return nil