Retidy shortcuts
parent
afff63c781
commit
2199726b2c
26
meli.1
26
meli.1
|
@ -62,8 +62,10 @@ At any time, you may press
|
||||||
.Cm \&?
|
.Cm \&?
|
||||||
to show a searchable list of all available actions and shortcuts, along with every possible setting and command that your version supports.
|
to show a searchable list of all available actions and shortcuts, along with every possible setting and command that your version supports.
|
||||||
.Pp
|
.Pp
|
||||||
The main visual navigation tool is the left-side sidebar. The menu's visibility may be toggled (default shortcut
|
The main visual navigation tool is the left-side sidebar. The menu's visibility may be toggled with
|
||||||
.Cm ` Ns
|
.Cm `
|
||||||
|
(shortcuts.listing:
|
||||||
|
.Ic toggle_menu_visibility Ns
|
||||||
).
|
).
|
||||||
.Pp
|
.Pp
|
||||||
The view into each folder has 4 modes: plain, threaded, conversations and compact. Plain views each mail indvidually, threaded shows their thread relationship visually, and conversations includes one entry per thread of emails (compact is one row per thread).
|
The view into each folder has 4 modes: plain, threaded, conversations and compact. Plain views each mail indvidually, threaded shows their thread relationship visually, and conversations includes one entry per thread of emails (compact is one row per thread).
|
||||||
|
@ -115,7 +117,9 @@ to enter
|
||||||
mode. At any time you may press
|
mode. At any time you may press
|
||||||
.Cm e
|
.Cm e
|
||||||
to launch your editor (see
|
to launch your editor (see
|
||||||
.Xr meli.conf 5 COMPOSING
|
.Xr meli.conf 5 COMPOSING Ns
|
||||||
|
, setting
|
||||||
|
.Ic editor_cmd
|
||||||
for how to select which editor to launch). Attachments may be handled with the
|
for how to select which editor to launch). Attachments may be handled with the
|
||||||
.Em add-attachment Ns
|
.Em add-attachment Ns
|
||||||
,
|
,
|
||||||
|
@ -125,7 +129,7 @@ commands (see below). Finally, pressing
|
||||||
will send your message by piping it into a binary of your choosing (see
|
will send your message by piping it into a binary of your choosing (see
|
||||||
.Xr meli.conf 5 COMPOSING Ns
|
.Xr meli.conf 5 COMPOSING Ns
|
||||||
, setting
|
, setting
|
||||||
.Em mailer_cmd Ns
|
.Ic mailer_cmd Ns
|
||||||
). To save your draft without sending it, issue command
|
). To save your draft without sending it, issue command
|
||||||
.Cm close
|
.Cm close
|
||||||
and select 'save as draft'.
|
and select 'save as draft'.
|
||||||
|
@ -139,6 +143,20 @@ directory instead and you will be notified of its location.
|
||||||
To open a draft for editing later, select your draft in the mail listing and press
|
To open a draft for editing later, select your draft in the mail listing and press
|
||||||
.Cm e Ns
|
.Cm e Ns
|
||||||
\&.
|
\&.
|
||||||
|
|
||||||
|
Your editor can be used in
|
||||||
|
.Nm Ns
|
||||||
|
\&'s embed terminal emulator by setting
|
||||||
|
.Ic embed
|
||||||
|
to
|
||||||
|
.Em true
|
||||||
|
in your composing settings. When launched, your editor captures all input until it exits or stops. To stop your editor and return to
|
||||||
|
.Nm
|
||||||
|
issue Ctrl-z and to resume editing press the
|
||||||
|
.Ic edit_mail
|
||||||
|
command again (default
|
||||||
|
.Em e Ns
|
||||||
|
).
|
||||||
.Sh SEARCH
|
.Sh SEARCH
|
||||||
Each e-mail storage backend has its default search method.
|
Each e-mail storage backend has its default search method.
|
||||||
.Em IMAP
|
.Em IMAP
|
||||||
|
|
206
meli.conf.5
206
meli.conf.5
|
@ -81,10 +81,12 @@ mailer_cmd = 'msmtp --read-recipients --read-envelope-from'
|
||||||
editor_cmd = 'vim +/^$'
|
editor_cmd = 'vim +/^$'
|
||||||
|
|
||||||
[shortcuts]
|
[shortcuts]
|
||||||
scroll_up = 'k'
|
[shortcuts.composing]
|
||||||
scroll_down = 'j'
|
edit_mail = 'e'
|
||||||
page_up = PageUp
|
|
||||||
page_down = PageDown
|
[shortcuts.listing]
|
||||||
|
new_mail = 'm'
|
||||||
|
set_seen = 'n'
|
||||||
|
|
||||||
[terminal]
|
[terminal]
|
||||||
theme = "light"
|
theme = "light"
|
||||||
|
@ -248,42 +250,234 @@ Shortcuts can take the following values:
|
||||||
.Qq Em PageDown
|
.Qq Em PageDown
|
||||||
.Qq Em Delete
|
.Qq Em Delete
|
||||||
.Qq Em Insert
|
.Qq Em Insert
|
||||||
|
.Qq Em Enter
|
||||||
|
.Qq Em Tab
|
||||||
.Qq Em Esc
|
.Qq Em Esc
|
||||||
|
.Qq Em F1..F12
|
||||||
|
.Qq Em M-char
|
||||||
|
.Qq Em C-char
|
||||||
and
|
and
|
||||||
.Qq Em char Ns
|
.Qq Em char Ns
|
||||||
, where char is a single character string.
|
, where char is a single character string.
|
||||||
|
|
||||||
|
The headings before each list indicate the map key of the shortcut list. For example for the first list titled
|
||||||
|
.Em general
|
||||||
|
the configuration is typed as follows:
|
||||||
|
.Bd -literal
|
||||||
|
[shortcuts.general]
|
||||||
|
next_tab = 'T'
|
||||||
|
.Ed
|
||||||
|
|
||||||
|
and for
|
||||||
|
.Em compact-listing Ns
|
||||||
|
:
|
||||||
|
.Bd -literal
|
||||||
|
[shortcuts.compact-listing]
|
||||||
|
open_thread = "Enter"
|
||||||
|
exit_thread = 'i'
|
||||||
|
.Bd
|
||||||
|
|
||||||
|
.Sy Em general
|
||||||
|
.Bl -tag -width 36n
|
||||||
|
.It Ic next_tab
|
||||||
|
Go to next tab.
|
||||||
|
.\" default value
|
||||||
|
.Pq Em T
|
||||||
|
.It Ic go_to_tab
|
||||||
|
Go to the
|
||||||
|
.Em n Ns
|
||||||
|
th tab
|
||||||
|
.Pq Em cannot be redefined
|
||||||
|
.El
|
||||||
|
|
||||||
|
.Sy Em listing
|
||||||
.Bl -tag -width 36n
|
.Bl -tag -width 36n
|
||||||
.It Ic prev_page
|
.It Ic prev_page
|
||||||
Go to previous page.
|
Go to previous page.
|
||||||
|
.\" default value
|
||||||
|
.Pq Em PageUp
|
||||||
.It Ic next_page
|
.It Ic next_page
|
||||||
Go to next page.
|
Go to next page.
|
||||||
|
.\" default value
|
||||||
|
.Pq Em PageDown
|
||||||
.It Ic prev_folder
|
.It Ic prev_folder
|
||||||
Go to previous folder.
|
Go to previous folder.
|
||||||
|
.\" default value
|
||||||
|
.Pq Em K
|
||||||
.It Ic next_folder
|
.It Ic next_folder
|
||||||
Go to next folder.
|
Go to next folder.
|
||||||
|
.\" default value
|
||||||
|
.Pq Em J
|
||||||
.It Ic prev_account
|
.It Ic prev_account
|
||||||
Go to previous account.
|
Go to previous account.
|
||||||
|
.\" default value
|
||||||
|
.Pq Em l
|
||||||
.It Ic next_account
|
.It Ic next_account
|
||||||
Go to next account.
|
Go to next account.
|
||||||
|
.\" default value
|
||||||
|
.Pq Em h
|
||||||
.It Ic new_mail
|
.It Ic new_mail
|
||||||
Start new mail draft in new tab
|
Start new mail draft in new tab
|
||||||
.It Ic open_thread
|
.\" default value
|
||||||
Open thread.
|
.Pq Em m
|
||||||
|
.It Ic search
|
||||||
|
Search within list of e-mails.
|
||||||
|
.\" default value
|
||||||
|
.Pq Em /
|
||||||
|
.It Ic toggle_menu_visibility
|
||||||
|
Toggle visibility of side menu in mail list.
|
||||||
|
.\" default value
|
||||||
|
.Pq Em `
|
||||||
|
.El
|
||||||
|
|
||||||
|
.Sy Em compact-listing
|
||||||
|
.Bl -tag -width 36n
|
||||||
.It Ic exit_thread
|
.It Ic exit_thread
|
||||||
Exit thread view
|
Exit thread view
|
||||||
|
.\" default value
|
||||||
|
.Pq Em i
|
||||||
|
.It Ic open_thread
|
||||||
|
Open thread.
|
||||||
|
.\" default value
|
||||||
|
.Pq Em Enter
|
||||||
|
.It Ic select_entry
|
||||||
|
Select thread entry.
|
||||||
|
.\" default value
|
||||||
|
.Pq Em v
|
||||||
|
.El
|
||||||
|
|
||||||
|
.Sy Em pager
|
||||||
|
.Bl -tag -width 36n
|
||||||
.It Ic scroll_up
|
.It Ic scroll_up
|
||||||
Scroll up pager.
|
Scroll up pager.
|
||||||
|
.\" default value
|
||||||
|
.Pq Em k
|
||||||
.It Ic scroll_down
|
.It Ic scroll_down
|
||||||
Scroll down pager.
|
Scroll down pager.
|
||||||
|
.\" default value
|
||||||
|
.Pq Em j
|
||||||
.It Ic page_up
|
.It Ic page_up
|
||||||
Go to previous pager page
|
Go to previous pager page
|
||||||
|
.\" default value
|
||||||
|
.Pq Em PageUp
|
||||||
.It Ic page_down
|
.It Ic page_down
|
||||||
Go to next pager pag
|
Go to next pager pag
|
||||||
|
.\" default value
|
||||||
|
.Pq Em PageDown
|
||||||
|
.El
|
||||||
|
|
||||||
|
.Sy Em contact-list
|
||||||
|
.Bl -tag -width 36n
|
||||||
.It Ic create_contact
|
.It Ic create_contact
|
||||||
Create new contact.
|
Create new contact.
|
||||||
|
.\" default value
|
||||||
|
.Pq Em c
|
||||||
.It Ic edit_contact
|
.It Ic edit_contact
|
||||||
Edit contact under cursor
|
Edit contact under cursor
|
||||||
|
.\" default value
|
||||||
|
.Pq Em e
|
||||||
|
.It Ic mail_contact
|
||||||
|
Mail contact under cursor
|
||||||
|
.\" default value
|
||||||
|
.Pq Em m
|
||||||
|
.It Ic toggle_menu_visibility
|
||||||
|
Toggle visibility of side menu in mail list.
|
||||||
|
.\" default value
|
||||||
|
.Pq Em `
|
||||||
.El
|
.El
|
||||||
|
|
||||||
|
|
||||||
|
.Sy Em composing
|
||||||
|
.Bl -tag -width 36n
|
||||||
|
.It Ic send_mail
|
||||||
|
Deliver draft to mailer
|
||||||
|
.\" default value
|
||||||
|
.Pq Em s
|
||||||
|
.It Ic edit_mail
|
||||||
|
Edit mail.
|
||||||
|
.\" default value
|
||||||
|
.Pq Em e
|
||||||
|
.El
|
||||||
|
|
||||||
|
.Sy Em envelope-view
|
||||||
|
|
||||||
|
To "select" an attachment, type its index (you will see the typed result in the command buffer on your bottom right of the status line) and then issue the corresponding command.
|
||||||
|
.Bl -tag -width 36n
|
||||||
|
.It Ic add_addresses_to_contacts Ns
|
||||||
|
Select addresses from envelope to add to contacts.
|
||||||
|
.\" default value
|
||||||
|
.Pq Em c
|
||||||
|
.It Ic view_raw_source
|
||||||
|
View raw envelope source in a pager.
|
||||||
|
.\" default value
|
||||||
|
.Pq Em M-r
|
||||||
|
.It Ic reply
|
||||||
|
Reply to envelope.
|
||||||
|
.\" default value
|
||||||
|
.Pq Em R
|
||||||
|
.It Ic edit
|
||||||
|
Open envelope in composer.
|
||||||
|
.\" default value
|
||||||
|
.Pq Em e
|
||||||
|
.It Ic return_to_normal_view
|
||||||
|
Return to envelope if viewing raw source or attachment.
|
||||||
|
.\" default value
|
||||||
|
.Pq Em r
|
||||||
|
.It Ic open_attachment
|
||||||
|
Opens selected attachment with
|
||||||
|
.Cm xdg-open
|
||||||
|
.\" default value
|
||||||
|
.Pq Em a
|
||||||
|
.It Ic open_mailcap
|
||||||
|
Opens selected attachment according to its mailcap entry. See
|
||||||
|
.Xr meli.1 FILES
|
||||||
|
for the mailcap file locations.
|
||||||
|
.\" default value
|
||||||
|
.Pq Em m
|
||||||
|
.It Ic go_to_url
|
||||||
|
Go to url of given index
|
||||||
|
.\" default value
|
||||||
|
.Pq Em g
|
||||||
|
.It Ic toggle_url_mode
|
||||||
|
Toggles url open mode. When active, it prepends an index next to each url that you can select by typing and open by issuing
|
||||||
|
.Ic go_to_url
|
||||||
|
.\" default value
|
||||||
|
.Pq Em u
|
||||||
|
.It Ic toggle_expand_headers
|
||||||
|
Expand extra headers (References and others)
|
||||||
|
.\" default value
|
||||||
|
.Pq Em h
|
||||||
|
.El
|
||||||
|
|
||||||
|
.Sy Em thread-view
|
||||||
|
.Bl -tag -width 36n
|
||||||
|
.It Ic reverse_thread_order
|
||||||
|
Reverse thread order.
|
||||||
|
.\" default value
|
||||||
|
.Pq Em r
|
||||||
|
.It Ic toggle_mailview
|
||||||
|
Toggle mail view visibility.
|
||||||
|
.\" default value
|
||||||
|
.Pq Em p
|
||||||
|
.It Ic toggle_threadview
|
||||||
|
Toggle thread view visibility.
|
||||||
|
.\" default value
|
||||||
|
.Pq Em t
|
||||||
|
.It Ic collapse_subtree
|
||||||
|
Collapse thread branches.
|
||||||
|
.\" default value
|
||||||
|
.Pq Em h
|
||||||
|
.It Ic prev_page
|
||||||
|
Go to previous page.
|
||||||
|
.\" default value
|
||||||
|
.Pq Em PageUp
|
||||||
|
.It Ic next_page
|
||||||
|
Go to next page.
|
||||||
|
.\" default value
|
||||||
|
.Pq Em PageDown
|
||||||
|
.El
|
||||||
|
|
||||||
|
.Bl -tag -width 36n
|
||||||
.Sh NOTIFICATIONS
|
.Sh NOTIFICATIONS
|
||||||
.Bl -tag -width 36n
|
.Bl -tag -width 36n
|
||||||
.It Ic enable Ar boolean
|
.It Ic enable Ar boolean
|
||||||
|
|
|
@ -68,8 +68,11 @@
|
||||||
#sound_file = PATH # optional
|
#sound_file = PATH # optional
|
||||||
|
|
||||||
##shortcuts
|
##shortcuts
|
||||||
# Compact mail listing defaults:
|
#[shortcuts.composing]
|
||||||
#[shortcuts.compact_listing]
|
#edit_mail = 'e'
|
||||||
|
#
|
||||||
|
# Thread view defaults:
|
||||||
|
#[shortcuts.compact-listing]
|
||||||
#exit_thread = 'i'
|
#exit_thread = 'i'
|
||||||
#
|
#
|
||||||
#[shortcuts.contact-list]
|
#[shortcuts.contact-list]
|
||||||
|
|
|
@ -105,7 +105,7 @@ impl fmt::Display for MailView {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl MailView {
|
impl MailView {
|
||||||
const DESCRIPTION: &'static str = "mail";
|
const DESCRIPTION: &'static str = "view mail";
|
||||||
pub fn new(
|
pub fn new(
|
||||||
coordinates: (usize, usize, EnvelopeHash),
|
coordinates: (usize, usize, EnvelopeHash),
|
||||||
pager: Option<Pager>,
|
pager: Option<Pager>,
|
||||||
|
@ -1316,27 +1316,21 @@ impl Component for MailView {
|
||||||
self.pager.get_shortcuts(context)
|
self.pager.get_shortcuts(context)
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut our_map = FnvHashMap::with_capacity_and_hasher(4, Default::default());
|
let mut our_map = context.settings.shortcuts.envelope_view.key_values();
|
||||||
our_map.insert("add_addresses_to_contacts", Key::Char('c'));
|
|
||||||
our_map.insert("view_raw_source", Key::Alt('r'));
|
if !(self.mode.is_attachment()
|
||||||
our_map.insert("reply", Key::Char('R'));
|
|
||||||
our_map.insert("edit", Key::Char('e'));
|
|
||||||
if self.mode.is_attachment()
|
|
||||||
|| self.mode == ViewMode::Subview
|
|| self.mode == ViewMode::Subview
|
||||||
|| self.mode == ViewMode::Raw
|
|| self.mode == ViewMode::Raw
|
||||||
|| self.mode == ViewMode::Url
|
|| self.mode == ViewMode::Url)
|
||||||
{
|
{
|
||||||
our_map.insert("return_to_normal_view", Key::Char('r'));
|
our_map.remove("return_to_normal_view");
|
||||||
}
|
}
|
||||||
our_map.insert("open_attachment", Key::Char('a'));
|
if self.mode != ViewMode::Url {
|
||||||
our_map.insert("open_mailcap", Key::Char('m'));
|
our_map.remove("go_to_url");
|
||||||
if self.mode == ViewMode::Url {
|
|
||||||
our_map.insert("go_to_url", Key::Char('g'));
|
|
||||||
}
|
}
|
||||||
if self.mode == ViewMode::Normal || self.mode == ViewMode::Url {
|
if !(self.mode == ViewMode::Normal || self.mode == ViewMode::Url) {
|
||||||
our_map.insert("toggle_url_mode", Key::Char('u'));
|
our_map.remove("toggle_url_mode");
|
||||||
}
|
}
|
||||||
our_map.insert("toggle_expand_headers", Key::Char('h'));
|
|
||||||
map.insert(MailView::DESCRIPTION, our_map);
|
map.insert(MailView::DESCRIPTION, our_map);
|
||||||
|
|
||||||
map
|
map
|
||||||
|
|
|
@ -1094,8 +1094,7 @@ impl Component for ThreadView {
|
||||||
}
|
}
|
||||||
fn get_shortcuts(&self, context: &Context) -> ShortcutMaps {
|
fn get_shortcuts(&self, context: &Context) -> ShortcutMaps {
|
||||||
let mut map = self.mailview.get_shortcuts(context);
|
let mut map = self.mailview.get_shortcuts(context);
|
||||||
//FIXME
|
let config_map = context.settings.shortcuts.thread_view.key_values();
|
||||||
let config_map = context.settings.shortcuts.envelope_view.key_values();
|
|
||||||
|
|
||||||
map.insert(ThreadView::DESCRIPTION, config_map);
|
map.insert(ThreadView::DESCRIPTION, config_map);
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,8 @@ pub struct Shortcuts {
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub envelope_view: EnvelopeViewShortcuts,
|
pub envelope_view: EnvelopeViewShortcuts,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
|
pub thread_view: ThreadViewShortcuts,
|
||||||
|
#[serde(default)]
|
||||||
pub pager: PagerShortcuts,
|
pub pager: PagerShortcuts,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +28,7 @@ macro_rules! shortcut_key_values {
|
||||||
(
|
(
|
||||||
$cname:expr,
|
$cname:expr,
|
||||||
$(#[$outer:meta])*
|
$(#[$outer:meta])*
|
||||||
pub struct $name:ident { $($fname:ident : Key |> $fdesc:literal |> $default:expr),* }) => {
|
pub struct $name:ident { $($fname:ident |> $fdesc:literal |> $default:expr),* }) => {
|
||||||
$(#[$outer])*
|
$(#[$outer])*
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
|
@ -64,71 +66,86 @@ macro_rules! shortcut_key_values {
|
||||||
shortcut_key_values! { "compact-listing",
|
shortcut_key_values! { "compact-listing",
|
||||||
/// Shortcut listing for a mail listing in compact mode.
|
/// Shortcut listing for a mail listing in compact mode.
|
||||||
pub struct CompactListingShortcuts {
|
pub struct CompactListingShortcuts {
|
||||||
open_thread: Key |> "Open thread." |> Key::Char('\n'),
|
exit_thread |> "Exit thread view." |> Key::Char('i'),
|
||||||
exit_thread: Key |> "Exit thread view." |> Key::Char('i'),
|
open_thread |> "Open thread." |> Key::Char('\n'),
|
||||||
select_entry: Key |> "Select thread entry." |> Key::Char('v')
|
select_entry |> "Select thread entry." |> Key::Char('v')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
shortcut_key_values! { "listing",
|
shortcut_key_values! { "listing",
|
||||||
/// Shortcut listing for a mail listing.
|
/// Shortcut listing for a mail listing.
|
||||||
pub struct ListingShortcuts {
|
pub struct ListingShortcuts {
|
||||||
prev_page: Key |> "Go to previous page." |> Key::PageUp,
|
new_mail |> "Start new mail draft in new tab." |> Key::Char('m'),
|
||||||
next_page: Key |> "Go to next page." |> Key::PageDown,
|
next_account |> "Go to next account." |> Key::Char('h'),
|
||||||
prev_folder: Key |> "Go to previous folder." |> Key::Char('K'),
|
next_folder |> "Go to next folder." |> Key::Char('J'),
|
||||||
next_folder: Key |> "Go to next folder." |> Key::Char('J'),
|
next_page |> "Go to next page." |> Key::PageDown,
|
||||||
prev_account: Key |> "Go to previous account." |> Key::Char('l'),
|
prev_account |> "Go to previous account." |> Key::Char('l'),
|
||||||
next_account: Key |> "Go to next account." |> Key::Char('h'),
|
prev_folder |> "Go to previous folder." |> Key::Char('K'),
|
||||||
new_mail: Key |> "Start new mail draft in new tab." |> Key::Char('m'),
|
prev_page |> "Go to previous page." |> Key::PageUp,
|
||||||
set_seen: Key |> "Set thread as seen." |> Key::Char('n'),
|
search |> "Search within list of e-mails." |> Key::Char('/'),
|
||||||
search: Key |> "Search within list of e-mails." |> Key::Char('/'),
|
set_seen |> "Set thread as seen." |> Key::Char('n'),
|
||||||
toggle_menu_visibility: Key |> "Toggle visibility of side menu in mail list." |> Key::Char('`')
|
toggle_menu_visibility |> "Toggle visibility of side menu in mail list." |> Key::Char('`')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
shortcut_key_values! { "contact-list",
|
shortcut_key_values! { "contact-list",
|
||||||
/// Shortcut listing for the contact list view
|
/// Shortcut listing for the contact list view
|
||||||
pub struct ContactListShortcuts {
|
pub struct ContactListShortcuts {
|
||||||
create_contact: Key |> "Create new contact." |> Key::Char('c'),
|
create_contact |> "Create new contact." |> Key::Char('c'),
|
||||||
edit_contact: Key |> "Edit contact under cursor." |> Key::Char('e'),
|
edit_contact |> "Edit contact under cursor." |> Key::Char('e'),
|
||||||
toggle_menu_visibility: Key |> "Toggle visibility of side menu in mail list." |> Key::Char('`'),
|
mail_contact |> "Mail contact under cursor." |> Key::Char('m'),
|
||||||
prev_account: Key |> "Go to previous account." |> Key::Char('l'),
|
next_account |> "Go to next account." |> Key::Char('h'),
|
||||||
next_account: Key |> "Go to next account." |> Key::Char('h')
|
prev_account |> "Go to previous account." |> Key::Char('l'),
|
||||||
|
toggle_menu_visibility |> "Toggle visibility of side menu in mail list." |> Key::Char('`')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
shortcut_key_values! { "pager",
|
shortcut_key_values! { "pager",
|
||||||
/// Shortcut listing for the text pager
|
/// Shortcut listing for the text pager
|
||||||
pub struct PagerShortcuts {
|
pub struct PagerShortcuts {
|
||||||
scroll_up: Key |> "Scroll up pager." |> Key::Char('k'),
|
page_down |> "Go to next pager page" |> Key::PageDown,
|
||||||
scroll_down: Key |> "Scroll down pager." |> Key::Char('j'),
|
page_up |> "Go to previous pager page" |> Key::PageUp,
|
||||||
page_up: Key |> "Go to previous pager page" |> Key::PageUp,
|
scroll_down |> "Scroll down pager." |> Key::Char('j'),
|
||||||
page_down: Key |> "Go to next pager page" |> Key::PageDown
|
scroll_up |> "Scroll up pager." |> Key::Char('k')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
shortcut_key_values! { "general",
|
shortcut_key_values! { "general",
|
||||||
pub struct GeneralShortcuts {
|
pub struct GeneralShortcuts {
|
||||||
next_tab: Key |> "Next tab." |> Key::Char('T'),
|
go_to_tab |> "Go to the nth tab" |> Key::Alt('n'),
|
||||||
go_to_tab: Key |> "Go to the nth tab" |> Key::Alt('n')
|
next_tab |> "Next tab." |> Key::Char('T')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
shortcut_key_values! { "composing",
|
shortcut_key_values! { "composing",
|
||||||
pub struct ComposingShortcuts {
|
pub struct ComposingShortcuts {
|
||||||
send_mail: Key |> "Deliver draft to mailer" |> Key::Char('s'),
|
edit_mail |> "Edit mail." |> Key::Char('e'),
|
||||||
edit_mail: Key |> "Edit mail." |> Key::Char('e')
|
send_mail |> "Deliver draft to mailer" |> Key::Char('s')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
shortcut_key_values! { "envelope-view",
|
shortcut_key_values! { "envelope-view",
|
||||||
pub struct EnvelopeViewShortcuts {
|
pub struct EnvelopeViewShortcuts {
|
||||||
reverse_thread_order: Key |> "reverse thread order" |> Key::Ctrl('r'),
|
add_addresses_to_contacts |> "Select addresses from envelope to add to contacts." |> Key::Char('c'),
|
||||||
toggle_mailview: Key |> "toggle mail view visibility" |> Key::Char('p'),
|
edit |> "Open envelope in composer." |> Key::Char('e'),
|
||||||
toggle_threadview: Key |> "toggle thread view visibility" |> Key::Char('t'),
|
go_to_url |> "Go to url of given index" |> Key::Char('g'),
|
||||||
collapse_subtree: Key |> "collapse thread branches" |> Key::Char('h'),
|
open_attachment |> "Opens selected attachment with xdg-open." |> Key::Char('a'),
|
||||||
exit_thread: Key |> "exit thread" |> Key::Char('i'),
|
open_mailcap |> "Opens selected attachment according to its mailcap entry." |> Key::Char('m'),
|
||||||
prev_page: Key |> "Go to previous page." |> Key::PageUp,
|
reply |> "Reply to envelope." |> Key::Char('R'),
|
||||||
next_page: Key |> "Go to next page." |> Key::PageDown
|
return_to_normal_view |> "Return to envelope if viewing raw source or attachment." |> Key::Char('r'),
|
||||||
|
toggle_expand_headers |> "Expand extra headers (References and others)." |> Key::Char('h'),
|
||||||
|
toggle_url_mode |> "Toggles url open mode." |> Key::Char('u'),
|
||||||
|
view_raw_source |> "View raw envelope source in a pager." |> Key::Alt('r')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
shortcut_key_values! { "thread-view",
|
||||||
|
pub struct ThreadViewShortcuts {
|
||||||
|
collapse_subtree |> "collapse thread branches" |> Key::Char('h'),
|
||||||
|
next_page |> "Go to next page." |> Key::PageDown,
|
||||||
|
prev_page |> "Go to previous page." |> Key::PageUp,
|
||||||
|
reverse_thread_order |> "reverse thread order" |> Key::Ctrl('r'),
|
||||||
|
toggle_mailview |> "toggle mail view visibility" |> Key::Char('p'),
|
||||||
|
toggle_threadview |> "toggle thread view visibility" |> Key::Char('t')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -255,7 +255,6 @@ pub fn get_events_raw(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const FIELDS: &[&str] = &[];
|
|
||||||
|
|
||||||
impl<'de> Deserialize<'de> for Key {
|
impl<'de> Deserialize<'de> for Key {
|
||||||
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
|
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
|
||||||
|
|
Loading…
Reference in New Issue