Commit Graph

202 Commits (0a34b082f695f3cd84d36eab1a9371248441a981)

Author SHA1 Message Date
Manos Pitsidianakis d580b25415
themes: overwrite only explicit key attributes
If user config file overwrites a single attribute and not the others,
for example only bg:

  "mail.listing.tag_default" = { bg = "Blue" }

The other attributes, in this case fg and attrs revert to the default
values of ThemeAttributeInner and not the default value for the key
"mail.listing.tag_default". As a result the above expands to:

  "mail.listing.tag_default" = { fg = Color::Default, bg = "Blue", attrs
  = Attr::Default }

This commit keeps the key value defaults, so the above should expand to:

  "mail.listing.tag_default" = { fg = default_theme["mail.listing.tag_default"].fg, bg = "Blue", attrs
  = default_theme["mail.listing.tag_default"].attrs }
4 years ago
Manos Pitsidianakis 18dcf15e1e
Add open_mailbox shortcut for sidebar 4 years ago
Manos Pitsidianakis d8135674df
themes: add {even,odd}_unseen, {even,odd}_selected, {even,odd}_highlighted
Suggested in #21
4 years ago
Manos Pitsidianakis e633434b93
themes: Fix invalid attribute links panic in is_cyclic
Attribute links are not checked for validity in theme validation, and an
invalid link would cause a panic in is_cyclic.

This commit improves the theme validation errors by printing if the
error lies in a theme key or a link.
4 years ago
Manos Pitsidianakis 4930d1b46c
Add Italics, Blink, Dim and Hidden text attributes
Text attributes have been rewritten as bit flags, so for example instead of
"BoldUnderline" you'd have to define "Bold | Underline" in your theme
settings.

Requested in #21
4 years ago
Manos Pitsidianakis e9a935dbf7
melib: add search method in mail backends 4 years ago
Manos Pitsidianakis 3d7b9ff7cb
Move Query to melib 4 years ago
Manos Pitsidianakis fd60be482f
Open sidebar for mailbox navigation with Left/Right arrow keys
Left/Right arrow keys change focus between the sidebar and mailbox
listing. If focused on sidebar, move arrow keys to select mailbox and
open with 'Enter'. Press Right arrow key to return to mailbox listing.

- Mailbox focused:
  +--+-------------+
  |~ |=============|
  |~ |=============|
  |  |=============|
  |~ |=============|
  |~ |=============|
  +--+-------------+
- Press `Left` arrow key
- Menu focused:
  +--------+-------+
  |~~~~    |=======|
  |~~      |=======|
  |        |=======|
  |~~~     |=======|
  |~~~~    |=======|
  +--------+-------+
- Press `Right` arrow key to return
4 years ago
Manos Pitsidianakis 840005022c
themes: add default tag theme attribute
The theme attribute key is "mail.listing.tag_default"
4 years ago
Manos Pitsidianakis e034f4dd52
view.rs: fix redrawing errors 4 years ago
Manos Pitsidianakis a3903ea2cb
Show Cc in default headers in mail view 4 years ago
Manos Pitsidianakis 4c32bf450d
Add {un,}subscribe mailbox operations
Concerns #17
4 years ago
Manos Pitsidianakis 9ff54f236b
Add conf_override! macro
conf_override! wraps struct definitions and defines a secondary Override
struct that wraps each field in an Option. The macro mailbox_settings!
is used to select settings from an account & mailbox index. If a user defines an overriding setting, the macro returns the override instead of the immediately next in the hierarchy setting.

The selection is done for a specific field as follows:

  if per-folder override is defined, return per-folder override
    else if per-account override is defined, return per-account override
      else return global setting field value.
4 years ago
Manos Pitsidianakis a8c1016f37
Add various logic checks 4 years ago
Manos Pitsidianakis 1811fb51cb
Fix unused imports/code compiler warnings 4 years ago
Manos Pitsidianakis b7175c2400
Fix compiler error in --no-default-features build 4 years ago
Manos Pitsidianakis 84d7e4c034
Small documentation fixes 4 years ago
Manos Pitsidianakis 31d90e1d87
Add managesieve.rs 4 years ago
Manos Pitsidianakis 651dda67cf
Respect autoload mailbox setting 4 years ago
Manos Pitsidianakis 106dae3334
Add config overrides to mailbox filter
If per-folder config filter is defined, it overrides the app-wide
filter.
4 years ago
Manos Pitsidianakis a3600c0cd2
Add `filter` option in mail list
Filter mail in mail list.

Example:
[listing]
filter = "not flags:seen" # show only unseen messages
4 years ago
Manos Pitsidianakis 9d20fd5576
Save forked processes for reaping 4 years ago
Manos Pitsidianakis 6c76db2063
Add delete, copy actions for envelopes 4 years ago
Manos Pitsidianakis 2a9059f9b4
Add add-attachment from pipe, default_header_values 4 years ago
Manos Pitsidianakis 63467a3c45
Check ComponentId equality on Composer::kill() 4 years ago
Manos Pitsidianakis 63af2a688a
Detect breaks on write_string_to_grid 4 years ago
Manos Pitsidianakis f10cc954e7
Don't dump mail on Account drop 4 years ago
Manos Pitsidianakis a94bb1e27a
Show float notification on refresh cmd 4 years ago
Manos Pitsidianakis 670485e8c7
compose: clear bounds of compose area properly 4 years ago
Manos Pitsidianakis 7b631beb0a
Don't panic in WorkController::drop 4 years ago
Manos Pitsidianakis ca51077f53
imap: Add support for untagged FETCH (FLAG.. messages
IDLE connection can get untagged "* FETCH (FLAGS ({flag_list))" messages
if any client has changed flags. Support this refresh event.
4 years ago
Manos Pitsidianakis 53fa3d03da
Notify embedded terminal on embedded process exit
When an embedded process exits the main process receives a SIGCHLD. The
check on whether the embedded process is alive is done on input, so
forward an input of '\0' to get the embedded terminal to notice its
child is dead.
4 years ago
Manos Pitsidianakis 126b65817e
Forward input on input/rawinput switch
Input thread listens on stdin input and forwards the input to the main
process. When an embedded terminal is launched within the main process,
the input thread is asked to switch to raw input, that is to send the
parsed input and the raw bytes to the main process in order to get them
forwarded to the embedded terminal. The switch happens by calling
get_events and get_events_raw.

When the input thread receives an InputCommand::{No,}Raw, it has already
received an input event, since the `select!` is within the
stdin events for loop. (There's no way to `select` on blocking iterators
or raw fds, which is unfortunate.).

This commit forwards the input to the next function instead of dropping
it.
4 years ago
Manos Pitsidianakis 7807f565ec
Clear input thread channel on restore()
The channel may contain Kill commands that will cause the new thread to
exit immediately.
4 years ago
Manos Pitsidianakis 65666e6695
Fix double call of restore_input
restore_input is called in State::rcv_event on arrival of a fork
finished event:

```
            UIEvent::Fork(ForkType::Finished) => {
                self.switch_to_main_screen();
                self.switch_to_alternate_screen();
                self.context.restore_input();
                return;
            }
```

So there shouldn't be an extra call here.
4 years ago
Manos Pitsidianakis bae083cc8f
Rename Filter action to search 4 years ago
Manos Pitsidianakis 760c1e859d
Add search shortcut to shortcut map 4 years ago
Manos Pitsidianakis 33c1bf6558
Add consume newlines flag to phrase() 4 years ago
Manos Pitsidianakis ac71d627f1
Implement search for CellBuffer 4 years ago
Manos Pitsidianakis 4ac52d9d5b
Replace every use of Folder with Mailbox
Use Mailbox for consistency.
4 years ago
Manos Pitsidianakis 1245eae0be
Add Knuth–Morris–Pratt to pager 4 years ago
Manos Pitsidianakis c9469f26ee
Remove duplicate function timer::arm()
arm() was a duplicate of set_value()
4 years ago
Manos Pitsidianakis 45c0160cb6
Fix ThreadListing
ThreadListing was broken after the ThreadGroup introduction
4 years ago
Manos Pitsidianakis 68007a0842
View decoded email source by default
Toggle between decoded/raw source with view_raw_source shortcut, default
M-r
4 years ago
Manos Pitsidianakis 44da24fc96
Add left/right cursor mvments to execute bar 4 years ago
Manos Pitsidianakis c88d1cae51
Fix create_box boundary fg color 4 years ago
Manos Pitsidianakis c4c11e4abc
Make Selector widget accept FnOnce 4 years ago
Manos Pitsidianakis 499fd59c6e
melib/imap: implement refresh() 4 years ago
Manos Pitsidianakis f38d03e43a
melib: {create,delete}_folder returns updated folders
Potential parent folders will have their children fields updated, so
just return all folders.
4 years ago
Manos Pitsidianakis e3abd458ce
Add ui_dialogs in State 4 years ago