| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
| |
when traversing the directory list, aerc will fetch the contents for
every directory even though the user might just move on to the next.
This causes an unnecessary delay (and load on the worker) and can be
avoided by skipping the old change-folder action when a newer one
arrives within a predefined time interval.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
improves change-folder responsiveness. When changing folders, the
highlighted directory is currently updated in a callback function to the
open-directory action. This creates an unpleasent lag in the ui until
the entire operation is done. Instead, we should provide an immediate
visual feedback of the selection to the user and keep loading the
directory contents in the background.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using the notmuch backend, it often makes more sense to sort
folders (actual virtual folders, or queries) by the order specified in
the query-map file, rather than alphabetically. This patch introduces a
configuration option (disabled by default) that allows this.
Additionally, due to the notmuch backend previously using maps (which
are order-undefined) to store the list of queries, default query
selection on aerc startup fluctuated. This patch fixes that by using
slices to store query order.
|
|
|
|
|
|
|
| |
I'm not sure what are the implications but it seems required.
Link: https://github.com/golang/go/issues/20883
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
| |
|
|
|
|
|
|
|
|
|
| |
Also update to the tcell v2 PaletteColor api, which should keep the chosen
theme of the user intact.
Note, that if $TRUECOLOR is defined and a truecolor given, aerc will now stop
clipping the value to one of the theme colors.
Generally this is desired behaviour though.
|
|
|
|
|
|
| |
There is a window where a new dir entry isn't yet in the dirlist.dir.
dirlist.ensureScroll however expected to always find a valid index.
Add a check so that we don't try to scroll to a -1 index.
|
|
|
|
|
|
| |
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 reverts commit 1ff687ca2b0821c2cacc1fa725abb3302d2af9da.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
Added a 'folders-exclude' option that allows removing selected folders
from the directory list sidebar. My motivating example was that removing
a single folder from the list using Golang regexes seemed pretty hard,
so this is a better way to do it. The excluded folders list is included
in the man page.
|
|
|
|
|
|
| |
This mimics the scrollbar implementation from the completion popover.
Only showing it when necessary and adapting the dirlist strings
appropriately.
|
|
|
|
| |
Should fix #402
|
|
|
|
| |
This reverts commit 0f78f06610c0e8887aba2ae50e99b86477a384b3.
|
|
|
|
|
|
|
|
|
|
| |
The following functionalities are added to configure aerc ui styles.
- Read stylesets from file with very basic fnmatch wildcard matching
- Add default styleset
- Support different stylesets as part of UiConfig allowing contextual
styles.
- Move widgets/ui elements to use the stylesets.
- Add configuration manual for the styleset
|
|
|
|
|
|
|
|
|
| |
This fixes an issue with the updated count logic, where only fetched messages
where counted to the exists string of the rue count.
Note that the count is still broken (we only count read / unread messages we
fetched, but that is the same behaviour as prior to the commit
66b68f35b3f3f3b97ec9951397fd75afeb0d0995)
|
| |
|
|
|
|
|
|
|
| |
This reverts commit bd4df530095ee343778a59120a9e641c01010b0f.
I did not properly untangle the opening / dirlist update of each other.
This interferes with the imap worker, hence the revert
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently the dirlist ignores the counts provided by the dirInfo.
However some of the workers can actually provide accurate counts much quicker
than if we count the flags.
Eventually we will also want to enable displaying counts for background folders,
where the brute force counting won't work as none of the headers are fetched yet.
This commit models it in an opt-in manner, if the flag isn't set then we still
count the messages manually.
|
|
|
|
|
|
| |
Previously, sending a DirectoryInfo assumed that a directory change
happened. However we don't want that if we only want to update the
unread message count.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the list of directories is empty trying to navigate in the
directory list did previously lead to a crash. With this change we
instead return early before trying to change the directory.
Example backtrace:
> panic: runtime error: index out of range [-1]
>
> goroutine 1 [running]:
> git.sr.ht/~sircmpwn/aerc/widgets.(*DirectoryList).NextPrev(0xc000160680, 0xffffffffffffffff)
> source/aerc/widgets/dirlist.go:285 +0xd4
> git.sr.ht/~sircmpwn/aerc/commands/account.NextPrevFolder.Execute(0xc000191040, 0xc00025c210, 0x1, 0x1, 0x0, 0xc00016f420)
> source/aerc/commands/account/next-folder.go:44 +0xe0
> git.sr.ht/~sircmpwn/aerc/commands.(*Commands).ExecuteCommand(0xc0000101a8, 0xc000191040, 0xc00025c210, 0x1, 0x1, 0xc000020070, 0xb46d01)
> source/aerc/commands/commands.go:66 +0xa7
> main.execCommand(0xc000191040, 0xc0001ca190, 0xc00025c210, 0x1, 0x1, 0xc00025c210, 0xc0003fb080)
> source/aerc/aerc.go:60 +0xc7
> main.main.func3(0xc00025c210, 0x1, 0x1, 0x1, 0x1)
> source/aerc/aerc.go:162 +0x57
> git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).BeginExCommand.func1(0xc000201db0, 0xb)
> source/aerc/widgets/aerc.go:382 +0x83
> git.sr.ht/~sircmpwn/aerc/widgets.(*ExLine).Event(0xc0003be100, 0xb475a0, 0xc00023cba0, 0xc00023cba0)
> source/aerc/widgets/exline.go:79 +0x131
> git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).Event(0xc000191040, 0xb475a0, 0xc00023cba0, 0x99ee01)
> source/aerc/widgets/aerc.go:202 +0x4c1
> git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).simulate(0xc000191040, 0xc000036f00, 0xd, 0x10)
> source/aerc/widgets/aerc.go:195 +0x8d
> git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).Event(0xc000191040, 0xb475a0, 0xc00023c9c0, 0x9c5a60)
> source/aerc/widgets/aerc.go:218 +0x3e8
> git.sr.ht/~sircmpwn/aerc/lib/ui.(*UI).Tick(0xc0001ca190, 0xa99d00)
> source/aerc/lib/ui/ui.go:92 +0x190
> main.main()
> source/aerc/aerc.go:192 +0x5f2
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The docs of strings.Compare state:
> Compare is included only for symmetry with package bytes. It is usually
> clearer and always faster to use the built-in string comparison operators
> ==, <, >, and so on.
So let's do that.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A new config options for accounts.conf (folders-sort) was added to
allow a user to choose which folders should be shown on top.
My use case was to avoid stepping into heavy, but rarely viewed folders
when cycling through other often accessed ones.
To test add this to your account.conf:
folders-sort = INBOX,Sent,Archive
INBOX, Sent and Archive should then show at the top of your dirlist,
and all other folders should come next in alphabetical order.
|
|
|
|
|
|
|
| |
Add an onUpdateDirs handler. This is used to invalidate the dirlist and
redraw with the correct number of recent/unread/total messages is shown.
A config option and formatting options are provided.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds the Mouseable interface. When this is implemented for a
component that item can accept and process mouseevents.
At the top level when a mouse event is received it is passed to the
grid's handler and then it trickles down until it reaches a component
that can actually handle it, such as the tablist, dirlist or msglist.
A mouse event is passed so that components can handle other things such
as scrolling with the mousewheel. The components themselves then perform
the necessary actions.
Clicking emails in the messagelist opens them in a new tab.
Textinputs can be clicked to position the cursor inside them.
Mouseevents are not forwarded to the terminal at the moment.
Elements which do not handle mouse events are not required to implement
the Mouseable interface.
|
|
|
|
|
|
|
|
|
|
|
| |
Allows to set `ui.spinner=` to a string which is then split by
`ui.spinner-delimiter=` (Default: comma) instead of having a hard coded
animation.
This implementation doesn't use INIs capabilities to split strings as
it trims whitespaces breaking the default animation.
Signed-off-by: Paul Spooren <mail@aparcar.org>
|
|
|
|
|
|
|
|
|
|
| |
The code was trying to compile the `~` as well. In this case, it was
trying to match a literal `~` to the front of the supplied regex.
Fixes: 334ca89bea381 ("folder filter: only assume regex if filter is
~fmt")
Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
|
| |
|
|
|
|
|
|
|
|
| |
It's nice to be able to filter the folders displayed in the side
bar. Basic string matching can get verbose with enough folders
whitelisted.
Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
|
|
|
|
|
|
| |
This fixes ~sircmpwn/aerc2#182
https://todo.sr.ht/~sircmpwn/aerc2/182
|
|
|
|
|
|
| |
This map represents a mapping from directory names to their associated
messagestores anyway so they should be under dirstore. This simply moves
them there and adds some methods required to interact with them.
|
| |
|
|
|
|
|
|
|
|
| |
Before, the information needed to display different parts of the UI was
tightly coupled to the specific messages being sent back and forth to
the backend worker. Separating out a models package allows us to be more
specific about exactly what a backend is able to and required to
provide for the UI.
|
| |
|
|
|
|
|
|
|
| |
Assuming we always have a sorted dirlist
(other code depends on that already), we don't need to loop over the
dirStore.
Any filtering done should be performed elsewhere
|
| |
|
|
|
|
|
| |
Also sets the public List() method to return the unfiltered
list of directories directly from the store.
|
|
|
|
|
| |
Credit for this fix goes to Reto; I guess if we're not gonna be mutt
we should probabaly do things correctly.
|
|
|
|
| |
This reverts commit 0e55637aac92e748267559b7aa91a188a17c386f.
|
|
|
|
|
| |
This fixes prev/next-folder that broke after
546dfcd76dd228e0605359e9985f0b6a5672e8fa
|
| |
|
|
|
|
|
| |
Tab completion currently only works on commands. Contextual completion
will be added in the future.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Many Drawable implementations have their own Invalidate and OnInvalidate
functions, with an unexported onInvalidate field. However OnInvalidate and
Invalidate are usually not called in the same goroutine. This results in a race
on this field, e.g.:
Read at 0x00c000094748 by goroutine 7:
git.sr.ht/~sircmpwn/aerc2/widgets.NewDirectoryList.func1()
/home/simon/src/aerc2/widgets/dirlist.go:85 +0x56
git.sr.ht/~sircmpwn/aerc2/widgets.(*Spinner).Start.func1()
/home/simon/src/aerc2/widgets/spinner.go:93 +0x1bb
Previous write at 0x00c000094748 by main goroutine:
[failed to restore the stack]
Goroutine 7 (running) created at:
git.sr.ht/~sircmpwn/aerc2/widgets.(*Spinner).Start()
/home/simon/src/aerc2/widgets/spinner.go:46 +0x8f
git.sr.ht/~sircmpwn/aerc2/widgets.NewDirectoryList()
/home/simon/src/aerc2/widgets/dirlist.go:37 +0x286
git.sr.ht/~sircmpwn/aerc2/widgets.NewAccountView()
/home/simon/src/aerc2/widgets/account.go:50 +0x5ca
git.sr.ht/~sircmpwn/aerc2/widgets.NewAerc()
/home/simon/src/aerc2/widgets/aerc.go:60 +0x800
main.main()
/home/simon/src/aerc2/aerc.go:65 +0x33e
To fix this, introduce a new type, Invalidatable, which protects the field.
Unfortunately the Drawable must be passed to the callback function in
Invalidate, so we still need to re-implement this in each Invalidatable user.
|
| |
|