~rjarry/aerc-devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
2 2

[PATCH aerc] style: add msglist_gutter and msglist_pill to config

Details
Message ID
<20230807001040.56585-2-k.shelekhin@ftml.net>
DKIM signature
missing
Download raw message
Patch: +19 -2
Allow a user to change the default style of the message list scrollbar.
There is no easy way to set the default style for an object directly in
code, so I've updated every built-in theme to preserve the existing
style.

Signed-off-by: Konstantin Shelekhin <k.shelekhin@ftml.net>
---
 CHANGELOG.md             | 1 +
 config/style.go          | 4 ++++
 doc/aerc-stylesets.7.scd | 4 ++++
 stylesets/blue           | 1 +
 stylesets/default        | 1 +
 stylesets/dracula        | 1 +
 stylesets/nord           | 2 ++
 stylesets/pink           | 1 +
 stylesets/solarized      | 1 +
 widgets/msglist.go       | 5 +++--
 10 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 29fba54..669b7c6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -24,6 +24,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
  `:compose`, `:forward`, `:recall`, etc.).
- Remove headers from the compose window with `:header -d <name>`.
- Add option `-r` to `:attach` to pipe the attachments in.
- Add `msglist_gutter` and `msglist_pill` styles for message list scrollbar.

### Fixed

diff --git a/config/style.go b/config/style.go
index 417f42b..2b1ef41 100644
--- a/config/style.go
+++ b/config/style.go
@@ -40,6 +40,8 @@ const (
	STYLE_MSGLIST_RESULT
	STYLE_MSGLIST_ANSWERED
	STYLE_MSGLIST_THREAD_FOLDED
	STYLE_MSGLIST_GUTTER
	STYLE_MSGLIST_PILL

	STYLE_DIRLIST_DEFAULT
	STYLE_DIRLIST_UNREAD
@@ -81,6 +83,8 @@ var StyleNames = map[string]StyleObject{
	"msglist_marked":   STYLE_MSGLIST_MARKED,
	"msglist_result":   STYLE_MSGLIST_RESULT,
	"msglist_answered": STYLE_MSGLIST_ANSWERED,
	"msglist_gutter":   STYLE_MSGLIST_GUTTER,
	"msglist_pill":     STYLE_MSGLIST_PILL,

	"msglist_thread_folded": STYLE_MSGLIST_THREAD_FOLDED,

diff --git a/doc/aerc-stylesets.7.scd b/doc/aerc-stylesets.7.scd
index 12aa97b..c28f564 100644
--- a/doc/aerc-stylesets.7.scd
+++ b/doc/aerc-stylesets.7.scd
@@ -109,6 +109,10 @@ styling.
:  The messages which match the current search.
|  *msglist_answered*
:  The messages marked as answered.
|  *msglist_gutter*
:  The message list gutter.
|  *msglist_pill*
:  The message list pill.
|  *dirlist_default*
:  The default style for directories in the directory list.
|  *dirlist_unread*
diff --git a/stylesets/blue b/stylesets/blue
index c3e8c47..c598ef9 100644
--- a/stylesets/blue
+++ b/stylesets/blue
@@ -32,6 +32,7 @@ msglist_marked.fg=white
msglist_marked.selected.fg=white
msglist_marked.bg=#005f87
msglist_marked.selected.bg=#005fff
msglist_pill.reverse=true

completion_pill.reverse=true
selector_focused.bold=true
diff --git a/stylesets/default b/stylesets/default
index 19eeb03..f3ea273 100644
--- a/stylesets/default
+++ b/stylesets/default
@@ -27,6 +27,7 @@ statusline_warning.reverse=true
msglist_unread.bold=true
msglist_deleted.fg=gray
msglist_result.fg=green
msglist_pill.reverse=true

completion_pill.reverse=true

diff --git a/stylesets/dracula b/stylesets/dracula
index c400865..9e24f42 100644
--- a/stylesets/dracula
+++ b/stylesets/dracula
@@ -32,6 +32,7 @@ msglist_marked.fg=black
msglist_marked.selected.fg=black
msglist_marked.bg=#BD93F9
msglist_marked.selected.bg=#9956f5
msglist_pill.reverse=true

completion_pill.reverse=false
selector_focused.bold=false
diff --git a/stylesets/nord b/stylesets/nord
index 8f7d514..f099a43 100644
--- a/stylesets/nord
+++ b/stylesets/nord
@@ -34,6 +34,8 @@ msglist_flagged.bold=true
msglist_unread.fg=#8fbcbb
msglist_unread.selected.bg=#88C0D0

msglist_pill.reverse=true

statusline_default.fg=#49576b
statusline_error.fg=#94545d

diff --git a/stylesets/pink b/stylesets/pink
index eb76a3f..1f73d0f 100644
--- a/stylesets/pink
+++ b/stylesets/pink
@@ -34,6 +34,7 @@ msglist_marked.fg=white
msglist_marked.selected.fg=white
msglist_marked.bg=#de4e85
msglist_marked.selected.bg=#c93687
msglist_pill.reverse=true

completion_pill.reverse=true
selector_focused.bold=true
diff --git a/stylesets/solarized b/stylesets/solarized
index 2d65e1a..026c375 100644
--- a/stylesets/solarized
+++ b/stylesets/solarized
@@ -23,6 +23,7 @@ msglist_marked.bg=#81a1c1
msglist_unread.fg=#b58900
msglist_unread.selected.bg=#b58900
msglist_unread.selected.fg=#002b36
msglist_pill.reverse=true
statusline_*.bg=#859900
statusline_*.fg=#002b36
statusline_error.bg=#d33682
diff --git a/widgets/msglist.go b/widgets/msglist.go
index a334d0d..dcb4cd3 100644
--- a/widgets/msglist.go
+++ b/widgets/msglist.go
@@ -237,8 +237,9 @@ func addMessage(
}

func (ml *MessageList) drawScrollbar(ctx *ui.Context) {
	gutterStyle := tcell.StyleDefault
	pillStyle := tcell.StyleDefault.Reverse(true)
	uiConfig := ml.aerc.SelectedAccountUiConfig()
	gutterStyle := uiConfig.GetStyle(config.STYLE_MSGLIST_GUTTER)
	pillStyle := uiConfig.GetStyle(config.STYLE_MSGLIST_PILL)

	// gutter
	ctx.Fill(0, 0, 1, ctx.Height(), ' ', gutterStyle)
-- 
2.41.0

[aerc/patches] build success

builds.sr.ht <builds@sr.ht>
Details
Message ID
<CULVOVN0BDWS.1XZZ5IZ5A83HC@cirno2>
In-Reply-To
<20230807001040.56585-2-k.shelekhin@ftml.net> (view parent)
DKIM signature
missing
Download raw message
aerc/patches: SUCCESS in 5m0s

[style: add msglist_gutter and msglist_pill to config][0] from [Konstantin Shelekhin][1]

[0]: https://lists.sr.ht/~rjarry/aerc-devel/patches/43389
[1]: k.shelekhin@ftml.net

✓ #1036495 SUCCESS aerc/patches/openbsd.yml     https://builds.sr.ht/~rjarry/job/1036495
✓ #1036494 SUCCESS aerc/patches/alpine-edge.yml https://builds.sr.ht/~rjarry/job/1036494
Details
Message ID
<CUPYTBZRVG0X.1OCBCEYRGJVGA@ringo>
In-Reply-To
<20230807001040.56585-2-k.shelekhin@ftml.net> (view parent)
DKIM signature
missing
Download raw message
Konstantin Shelekhin, Aug 07, 2023 at 02:11:
> Allow a user to change the default style of the message list scrollbar.
> There is no easy way to set the default style for an object directly in
> code, so I've updated every built-in theme to preserve the existing
> style.
>
> Signed-off-by: Konstantin Shelekhin <k.shelekhin@ftml.net>

Acked-by: Robin-Jarry <robin@jarry.cc>

Applied. Thanks!
Reply to thread Export thread (mbox)