2019-01-21 21:44:13 +00:00
|
|
|
local Device = require("device")
|
|
|
|
|
2017-03-05 11:46:27 +00:00
|
|
|
local order = {
|
|
|
|
["KOMenu:menu_buttons"] = {
|
|
|
|
"navi",
|
|
|
|
"typeset",
|
|
|
|
"setting",
|
|
|
|
"tools",
|
|
|
|
"search",
|
|
|
|
"filemanager",
|
|
|
|
"main",
|
|
|
|
},
|
|
|
|
navi = {
|
|
|
|
"table_of_contents",
|
|
|
|
"bookmarks",
|
2018-10-16 19:05:58 +00:00
|
|
|
"toggle_bookmark",
|
2017-09-23 16:25:22 +00:00
|
|
|
"bookmark_browsing_mode",
|
2020-03-26 13:04:59 +00:00
|
|
|
"page_map",
|
2017-04-06 12:56:40 +00:00
|
|
|
"----------------------------",
|
2017-03-05 11:46:27 +00:00
|
|
|
"go_to",
|
|
|
|
"skim_to",
|
2019-09-01 19:30:19 +00:00
|
|
|
"autoturn",
|
2017-04-06 12:56:40 +00:00
|
|
|
"----------------------------",
|
2018-01-17 19:28:33 +00:00
|
|
|
"go_to_previous_location",
|
2017-03-05 11:46:27 +00:00
|
|
|
},
|
|
|
|
typeset = {
|
|
|
|
"set_render_style",
|
2018-05-12 21:24:43 +00:00
|
|
|
"style_tweaks",
|
2017-04-06 12:56:40 +00:00
|
|
|
"----------------------------",
|
2017-03-05 11:46:27 +00:00
|
|
|
"change_font",
|
2020-04-21 19:30:16 +00:00
|
|
|
"typography",
|
2018-05-14 18:35:49 +00:00
|
|
|
"floating_punctuation",
|
2017-04-06 12:56:40 +00:00
|
|
|
"----------------------------",
|
2018-05-14 18:35:49 +00:00
|
|
|
"switch_zoom_mode",
|
|
|
|
"----------------------------",
|
|
|
|
"page_overlap",
|
2017-04-06 12:56:40 +00:00
|
|
|
"speed_reading_module_perception_expander",
|
2018-05-14 18:35:49 +00:00
|
|
|
"----------------------------",
|
|
|
|
"highlight_options",
|
2017-03-05 11:46:27 +00:00
|
|
|
},
|
|
|
|
setting = {
|
|
|
|
-- common settings
|
|
|
|
-- those that don't exist will simply be skipped during menu gen
|
|
|
|
"frontlight", -- if Device:hasFrontlight()
|
|
|
|
"night_mode",
|
|
|
|
"----------------------------",
|
|
|
|
"network",
|
|
|
|
"screen",
|
2018-09-21 13:25:07 +00:00
|
|
|
"----------------------------",
|
2019-02-28 19:42:00 +00:00
|
|
|
"taps_and_gestures",
|
2018-04-09 07:22:16 +00:00
|
|
|
"navigation",
|
2019-02-28 19:42:00 +00:00
|
|
|
"document",
|
2017-03-05 11:46:27 +00:00
|
|
|
"----------------------------",
|
|
|
|
"language",
|
2018-08-11 20:47:33 +00:00
|
|
|
"device",
|
2017-03-05 11:46:27 +00:00
|
|
|
"----------------------------",
|
|
|
|
"djvu_render_mode",
|
|
|
|
"status_bar",
|
|
|
|
},
|
2018-08-11 20:47:33 +00:00
|
|
|
device = {
|
2019-09-06 15:01:37 +00:00
|
|
|
"keyboard_layout",
|
2018-08-11 20:47:33 +00:00
|
|
|
"time",
|
|
|
|
"battery",
|
2019-03-26 22:03:18 +00:00
|
|
|
"autosuspend",
|
2019-09-12 12:15:08 +00:00
|
|
|
"autoshutdown",
|
2019-06-28 20:19:25 +00:00
|
|
|
"ignore_sleepcover",
|
|
|
|
"ignore_open_sleepcover",
|
2019-02-15 00:18:30 +00:00
|
|
|
"mass_storage_settings",
|
2019-09-17 11:01:40 +00:00
|
|
|
"screenshot",
|
2018-08-11 20:47:33 +00:00
|
|
|
},
|
2019-02-28 21:38:24 +00:00
|
|
|
navigation = {
|
|
|
|
"back_to_exit",
|
|
|
|
"back_in_filemanager",
|
|
|
|
"enable_back_history",
|
2019-08-01 16:27:24 +00:00
|
|
|
"android_volume_keys",
|
2019-11-05 23:52:44 +00:00
|
|
|
"android_camera_key",
|
2020-05-05 09:18:18 +00:00
|
|
|
"android_haptic_feedback",
|
2019-02-28 21:38:24 +00:00
|
|
|
"----------------------------",
|
2019-08-30 11:25:51 +00:00
|
|
|
"invert_page_turn_gestures",
|
2019-02-28 21:38:24 +00:00
|
|
|
"invert_page_turn_buttons",
|
|
|
|
},
|
2018-05-13 19:27:52 +00:00
|
|
|
network = {
|
|
|
|
"network_wifi",
|
|
|
|
"network_proxy",
|
|
|
|
"network_restore",
|
|
|
|
"network_info",
|
|
|
|
"network_before_wifi_action",
|
2018-07-07 15:06:58 +00:00
|
|
|
"network_dismiss_scan",
|
2018-05-13 19:27:52 +00:00
|
|
|
"----------------------------",
|
|
|
|
"ssh",
|
|
|
|
},
|
2019-02-28 17:32:11 +00:00
|
|
|
screen = {
|
|
|
|
"screensaver",
|
|
|
|
"----------------------------",
|
|
|
|
"screen_dpi",
|
|
|
|
"screen_eink_opt",
|
|
|
|
"color_rendering",
|
|
|
|
"----------------------------",
|
|
|
|
"screen_toggle_gsensor",
|
|
|
|
"----------------------------",
|
2019-07-26 21:04:20 +00:00
|
|
|
"screen_timeout",
|
2019-02-28 17:32:11 +00:00
|
|
|
"fullscreen",
|
|
|
|
},
|
2019-02-28 19:42:00 +00:00
|
|
|
taps_and_gestures = {
|
|
|
|
"gesture_manager",
|
2019-07-24 12:31:20 +00:00
|
|
|
"gesture_intervals",
|
2019-02-28 19:42:00 +00:00
|
|
|
"----------------------------",
|
|
|
|
"follow_links",
|
|
|
|
"----------------------------",
|
|
|
|
"menu_activate",
|
2019-09-19 14:51:47 +00:00
|
|
|
"ignore_hold_corners",
|
2019-02-28 19:42:00 +00:00
|
|
|
"screen_disable_double_tab",
|
|
|
|
},
|
2017-03-05 11:46:27 +00:00
|
|
|
tools = {
|
2017-04-06 09:12:35 +00:00
|
|
|
"read_timer",
|
2017-03-05 11:46:27 +00:00
|
|
|
"calibre_wireless_connection",
|
|
|
|
"evernote",
|
|
|
|
"statistics",
|
|
|
|
"progress_sync",
|
2020-05-02 21:02:36 +00:00
|
|
|
"move_to_archive",
|
2018-10-16 18:49:44 +00:00
|
|
|
"wallabag",
|
2017-03-05 11:46:27 +00:00
|
|
|
"zsync",
|
2017-05-08 20:15:42 +00:00
|
|
|
"news_downloader",
|
2018-02-22 23:02:32 +00:00
|
|
|
"send2ebook",
|
2018-08-06 19:16:30 +00:00
|
|
|
"text_editor",
|
2017-06-24 07:55:31 +00:00
|
|
|
"----------------------------",
|
|
|
|
"more_plugins",
|
2018-08-17 18:54:11 +00:00
|
|
|
"plugin_management",
|
2017-06-24 07:55:31 +00:00
|
|
|
},
|
|
|
|
more_plugins = {
|
|
|
|
"auto_frontlight",
|
|
|
|
"battery_statistics",
|
|
|
|
"synchronize_time",
|
|
|
|
"keep_alive",
|
2019-10-08 15:14:38 +00:00
|
|
|
"doc_setting_tweak",
|
2017-04-02 06:50:24 +00:00
|
|
|
"terminal",
|
2017-03-05 11:46:27 +00:00
|
|
|
},
|
|
|
|
search = {
|
|
|
|
"dictionary_lookup",
|
2017-10-07 20:13:46 +00:00
|
|
|
"dictionary_lookup_history",
|
2017-08-22 15:24:31 +00:00
|
|
|
"dictionary_settings",
|
2017-07-03 06:29:11 +00:00
|
|
|
"----------------------------",
|
2017-03-05 11:46:27 +00:00
|
|
|
"wikipedia_lookup",
|
2017-12-17 12:02:08 +00:00
|
|
|
"wikipedia_history",
|
2017-08-22 15:24:31 +00:00
|
|
|
"wikipedia_settings",
|
2017-04-06 12:56:40 +00:00
|
|
|
"----------------------------",
|
2018-12-17 13:15:13 +00:00
|
|
|
"translation_settings",
|
|
|
|
"----------------------------",
|
2017-04-06 12:56:40 +00:00
|
|
|
"goodreads",
|
|
|
|
"----------------------------",
|
2017-03-05 11:46:27 +00:00
|
|
|
"fulltext_search",
|
|
|
|
},
|
|
|
|
filemanager = {},
|
|
|
|
main = {
|
|
|
|
"history",
|
2018-07-07 11:03:33 +00:00
|
|
|
"open_previous_document",
|
|
|
|
"----------------------------",
|
2019-11-05 23:17:28 +00:00
|
|
|
"collections",
|
|
|
|
"----------------------------",
|
2017-03-05 11:46:27 +00:00
|
|
|
"book_status",
|
2017-07-01 10:11:44 +00:00
|
|
|
"book_info",
|
2017-03-05 11:46:27 +00:00
|
|
|
"----------------------------",
|
2017-09-03 13:40:50 +00:00
|
|
|
"system_statistics",
|
2019-02-15 00:18:30 +00:00
|
|
|
"mass_storage_actions",
|
2017-09-03 13:40:50 +00:00
|
|
|
"----------------------------",
|
2018-10-06 05:55:35 +00:00
|
|
|
"ota_update", -- if Device:hasOTAUpdates()
|
2017-03-05 11:46:27 +00:00
|
|
|
"version",
|
|
|
|
"help",
|
2017-05-14 16:43:08 +00:00
|
|
|
"----------------------------",
|
2017-09-03 13:40:50 +00:00
|
|
|
"exit_menu",
|
2017-03-05 11:46:27 +00:00
|
|
|
},
|
2017-04-03 21:52:47 +00:00
|
|
|
help = {
|
2017-04-15 12:45:56 +00:00
|
|
|
"quickstart_guide",
|
|
|
|
"----------------------------",
|
2017-04-03 21:52:47 +00:00
|
|
|
"report_bug",
|
|
|
|
"----------------------------",
|
|
|
|
"about",
|
|
|
|
},
|
2017-09-03 13:40:50 +00:00
|
|
|
exit_menu = {
|
|
|
|
"restart_koreader",
|
|
|
|
"----------------------------",
|
|
|
|
"sleep", -- if Device:isKindle() or Device:isKobo()
|
|
|
|
"poweroff", -- if Device:isKobo()
|
|
|
|
"reboot", -- if Device:isKobo()
|
|
|
|
"----------------------------",
|
2019-09-04 18:54:43 +00:00
|
|
|
"start_bq",
|
2017-09-03 13:40:50 +00:00
|
|
|
"exit",
|
|
|
|
}
|
2017-03-05 11:46:27 +00:00
|
|
|
}
|
|
|
|
|
2019-01-21 21:44:13 +00:00
|
|
|
if Device:isAndroid() then
|
|
|
|
order.exit_menu = nil
|
|
|
|
end
|
|
|
|
|
2017-03-05 11:46:27 +00:00
|
|
|
return order
|