-
Notifications
You must be signed in to change notification settings - Fork 4
/
default.rs
106 lines (103 loc) · 3.44 KB
/
default.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
use crate::keymap::{macros::keymap, KeymapsConfig};
pub fn default() -> KeymapsConfig {
let login = keymap!({
"enter" => authenticate,
"k" | "up" => move_up_authentication_provider,
"j" | "down" => move_down_authentication_provider,
});
let tabs = keymap!({
"tab" => move_right_tab_selection,
"backtab" => move_left_tab_selection,
});
let entries = keymap!({
"k" | "up" => move_up_entry,
"j" | "down" => move_down_entry,
"r" => reload_entries,
"enter" => open_entry,
"space" => browse_entry,
"g" => {
"g" => move_entry_first,
"e" => move_entry_last,
},
});
let subscription = keymap!({
"a" => prompt_feed_subscription,
"e" => prompt_feed_edition,
"d" => prompt_feed_unsubscription,
"k" | "up" => move_up_subscribed_feed,
"j" | "down" => move_down_subscribed_feed,
"r" => reload_subscription,
"enter" => open_feed,
"g" => {
"g" => move_subscribed_feed_first,
"e" => move_subscribed_feed_last,
},
});
let gh_notification = keymap!({
"k" | "up" => move_up_gh_notification,
"j" | "down" => move_down_gh_notification,
"enter" => open_gh_notification,
"A-enter" => open_gh_notification_with_done,
"r" => reload_gh_notifications,
"d" => mark_gh_notification_as_done,
"S-d" => mark_gh_notification_as_done_all,
"u" => unsubscribe_gh_thread,
"g" => {
"g" => move_gh_notification_first,
"e" => move_gh_notification_last,
},
"f" => open_gh_notification_filter_popup,
});
let gh_notification_filter_popup = keymap!({
"u" => {
"n" => toggle_gh_notification_filter_popup_include_unread,
},
"c" => {
"l" => toggle_gh_notification_filter_popup_pr_closed,
},
"p" => {
"a" => toggle_gh_notification_filter_popup_participating,
"u" => toggle_gh_notification_filter_popup_visibility_public,
"r" => toggle_gh_notification_filter_popup_visibility_private,
},
"o" => {
"p" => toggle_gh_notification_filter_popup_pr_open,
},
"m" => {
"e" => toggle_gh_notification_filter_popup_reason_mentioned,
"r" => toggle_gh_notification_filter_popup_pr_merged,
},
"r" => {
"e" => toggle_gh_notification_filter_popup_reason_review,
},
"esc" | "enter" => close_gh_notification_filter_popup,
});
let filter = keymap!({
"h" | "left" => move_filter_requirement_left,
"l" | "right" => move_filter_requirement_right,
"c" => activate_category_filtering,
"/" => activate_search_filtering,
"esc" => deactivate_filtering,
});
let unsubscribe_popup = keymap!({
"h" | "left" => move_feed_unsubscription_popup_selection_left,
"l" | "right" => move_feed_unsubscription_popup_selection_right,
"enter" => select_feed_unsubscription_popup,
"esc" => cancel_feed_unsubscription_popup,
});
let global = keymap!({
"q" | "C-c" => quit ,
"S-t" => rotate_theme,
});
KeymapsConfig {
login,
tabs,
entries,
subscription,
gh_notification,
gh_notification_filter_popup,
filter,
unsubscribe_popup,
global,
}
}