about summary refs log tree commit diff stats
path: root/commands/compose
diff options
context:
space:
mode:
authorKalyan Sriram <coder.kalyan@gmail.com>2020-07-27 01:03:55 -0700
committerReto Brunner <reto@labrat.space>2020-07-30 19:35:59 +0200
commit1ff687ca2b0821c2cacc1fa725abb3302d2af9da (patch)
treeb84df04a645c1fd2ee94d7a08f2f9c717930e9ab /commands/compose
parent1bab1754f095a5c0537fc639d0214f6efbb340a2 (diff)
downloadaerc-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/compose')
-rw-r--r--commands/compose/attach.go5
-rw-r--r--commands/compose/detach.go5
2 files changed, 2 insertions, 8 deletions
diff --git a/commands/compose/attach.go b/commands/compose/attach.go
index 2b633dc..148442b 100644
--- a/commands/compose/attach.go
+++ b/commands/compose/attach.go
@@ -4,11 +4,9 @@ import (
 	"fmt"
 	"os"
 	"strings"
-	"time"
 
 	"git.sr.ht/~sircmpwn/aerc/commands"
 	"git.sr.ht/~sircmpwn/aerc/widgets"
-	"github.com/gdamore/tcell"
 	"github.com/mitchellh/go-homedir"
 )
 
@@ -52,8 +50,7 @@ func (Attach) Execute(aerc *widgets.Aerc, args []string) error {
 	composer, _ := aerc.SelectedTab().(*widgets.Composer)
 	composer.AddAttachment(path)
 
-	aerc.PushStatus(fmt.Sprintf("Attached %s", pathinfo.Name()), 10*time.Second).
-		Color(tcell.ColorDefault, tcell.ColorGreen)
+	aerc.PushSuccess(fmt.Sprintf("Attached %s", pathinfo.Name()))
 
 	return nil
 }
diff --git a/commands/compose/detach.go b/commands/compose/detach.go
index e8b07ed..b48159d 100644
--- a/commands/compose/detach.go
+++ b/commands/compose/detach.go
@@ -3,10 +3,8 @@ package compose
 import (
 	"fmt"
 	"strings"
-	"time"
 
 	"git.sr.ht/~sircmpwn/aerc/widgets"
-	"github.com/gdamore/tcell"
 )
 
 type Detach struct{}
@@ -44,8 +42,7 @@ func (Detach) Execute(aerc *widgets.Aerc, args []string) error {
 		return err
 	}
 
-	aerc.PushStatus(fmt.Sprintf("Detached %s", path), 10*time.Second).
-		Color(tcell.ColorDefault, tcell.ColorGreen)
+	aerc.PushSuccess(fmt.Sprintf("Detached %s", path))
 
 	return nil
 }