diff options
author | Kalyan Sriram <coder.kalyan@gmail.com> | 2020-07-27 01:03:55 -0700 |
---|---|---|
committer | Reto Brunner <reto@labrat.space> | 2020-07-30 19:35:59 +0200 |
commit | 1ff687ca2b0821c2cacc1fa725abb3302d2af9da (patch) | |
tree | b84df04a645c1fd2ee94d7a08f2f9c717930e9ab /commands/exec.go | |
parent | 1bab1754f095a5c0537fc639d0214f6efbb340a2 (diff) | |
download | aerc-1ff687ca2b0821c2cacc1fa725abb3302d2af9da.tar.gz |
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.
Diffstat (limited to 'commands/exec.go')
-rw-r--r-- | commands/exec.go | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/commands/exec.go b/commands/exec.go index e15afbe9..7d24fdc1 100644 --- a/commands/exec.go +++ b/commands/exec.go @@ -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 |