2019-01-21 22:44:13 +01:00
|
|
|
local Device = require("device")
|
|
|
|
|
|
2017-03-05 12:46:27 +01:00
|
|
|
local order = {
|
|
|
|
|
["KOMenu:menu_buttons"] = {
|
|
|
|
|
"navi",
|
|
|
|
|
"typeset",
|
|
|
|
|
"setting",
|
|
|
|
|
"tools",
|
|
|
|
|
"search",
|
|
|
|
|
"filemanager",
|
|
|
|
|
"main",
|
|
|
|
|
},
|
|
|
|
|
navi = {
|
|
|
|
|
"table_of_contents",
|
|
|
|
|
"bookmarks",
|
2018-10-16 21:05:58 +02:00
|
|
|
"toggle_bookmark",
|
2017-09-23 18:25:22 +02:00
|
|
|
"bookmark_browsing_mode",
|
2021-02-04 17:43:52 +01:00
|
|
|
"navi_settings",
|
|
|
|
|
"----------------------------",
|
2020-03-26 14:04:59 +01:00
|
|
|
"page_map",
|
2020-10-31 10:40:36 +01:00
|
|
|
"hide_nonlinear_flows",
|
2017-04-06 14:56:40 +02:00
|
|
|
"----------------------------",
|
2017-03-05 12:46:27 +01:00
|
|
|
"go_to",
|
|
|
|
|
"skim_to",
|
2019-09-01 21:30:19 +02:00
|
|
|
"autoturn",
|
2017-04-06 14:56:40 +02:00
|
|
|
"----------------------------",
|
2018-01-17 20:28:33 +01:00
|
|
|
"go_to_previous_location",
|
2017-03-05 12:46:27 +01:00
|
|
|
},
|
2021-02-04 17:43:52 +01:00
|
|
|
navi_settings = {
|
|
|
|
|
"toc_alt_toc",
|
|
|
|
|
"----------------------------",
|
|
|
|
|
"toc_ticks_level_ignore",
|
|
|
|
|
"----------------------------",
|
|
|
|
|
"toc_items_per_page",
|
|
|
|
|
"toc_items_font_size",
|
|
|
|
|
"----------------------------",
|
|
|
|
|
"bookmarks_items_per_page",
|
|
|
|
|
"bookmarks_items_font_size",
|
|
|
|
|
"bookmarks_items_show_more_text",
|
|
|
|
|
},
|
2017-03-05 12:46:27 +01:00
|
|
|
typeset = {
|
|
|
|
|
"set_render_style",
|
2018-05-12 23:24:43 +02:00
|
|
|
"style_tweaks",
|
2017-04-06 14:56:40 +02:00
|
|
|
"----------------------------",
|
2017-03-05 12:46:27 +01:00
|
|
|
"change_font",
|
2020-04-21 21:30:16 +02:00
|
|
|
"typography",
|
2018-05-14 20:35:49 +02:00
|
|
|
"floating_punctuation",
|
2017-04-06 14:56:40 +02:00
|
|
|
"----------------------------",
|
2018-05-14 20:35:49 +02:00
|
|
|
"switch_zoom_mode",
|
|
|
|
|
"----------------------------",
|
|
|
|
|
"page_overlap",
|
2017-04-06 14:56:40 +02:00
|
|
|
"speed_reading_module_perception_expander",
|
2018-05-14 20:35:49 +02:00
|
|
|
"----------------------------",
|
|
|
|
|
"highlight_options",
|
2020-09-24 15:17:37 +02:00
|
|
|
"panel_zoom_options"
|
2017-03-05 12:46:27 +01: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 15:25:07 +02:00
|
|
|
"----------------------------",
|
2019-02-28 20:42:00 +01:00
|
|
|
"taps_and_gestures",
|
2018-04-09 09:22:16 +02:00
|
|
|
"navigation",
|
2019-02-28 20:42:00 +01:00
|
|
|
"document",
|
2017-03-05 12:46:27 +01:00
|
|
|
"----------------------------",
|
|
|
|
|
"language",
|
2018-08-11 22:47:33 +02:00
|
|
|
"device",
|
2017-03-05 12:46:27 +01:00
|
|
|
"----------------------------",
|
|
|
|
|
"djvu_render_mode",
|
|
|
|
|
"status_bar",
|
|
|
|
|
},
|
2018-08-11 22:47:33 +02:00
|
|
|
device = {
|
2019-09-06 17:01:37 +02:00
|
|
|
"keyboard_layout",
|
2018-08-11 22:47:33 +02:00
|
|
|
"time",
|
|
|
|
|
"battery",
|
2020-10-22 01:17:34 +02:00
|
|
|
"charging_led", -- if Device:canToggleChargingLED()
|
2020-09-01 00:23:09 +02:00
|
|
|
"autostandby",
|
2019-03-26 23:03:18 +01:00
|
|
|
"autosuspend",
|
2019-09-12 14:15:08 +02:00
|
|
|
"autoshutdown",
|
2019-06-28 22:19:25 +02:00
|
|
|
"ignore_sleepcover",
|
|
|
|
|
"ignore_open_sleepcover",
|
2020-11-04 19:15:07 +01:00
|
|
|
"ignore_battery_optimizations",
|
2020-10-22 01:17:34 +02:00
|
|
|
"mass_storage_settings", -- if Device:canToggleMassStorage()
|
2020-09-01 16:39:47 +02:00
|
|
|
"file_ext_assoc",
|
2019-09-17 13:01:40 +02:00
|
|
|
"screenshot",
|
2018-08-11 22:47:33 +02:00
|
|
|
},
|
2019-02-28 22:38:24 +01:00
|
|
|
navigation = {
|
|
|
|
|
"back_to_exit",
|
|
|
|
|
"back_in_filemanager",
|
2020-11-03 22:51:11 +01:00
|
|
|
"back_in_reader",
|
2019-08-01 18:27:24 +02:00
|
|
|
"android_volume_keys",
|
2019-11-06 00:52:44 +01:00
|
|
|
"android_camera_key",
|
2020-05-05 11:18:18 +02:00
|
|
|
"android_haptic_feedback",
|
2020-06-15 07:43:37 +02:00
|
|
|
"android_back_button",
|
2019-02-28 22:38:24 +01:00
|
|
|
"----------------------------",
|
2019-08-30 13:25:51 +02:00
|
|
|
"invert_page_turn_gestures",
|
2019-02-28 22:38:24 +01:00
|
|
|
"invert_page_turn_buttons",
|
|
|
|
|
},
|
2018-05-13 21:27:52 +02:00
|
|
|
network = {
|
|
|
|
|
"network_wifi",
|
|
|
|
|
"network_proxy",
|
Various Wi-Fi QoL improvements (#6424)
* Revamped most actions that require an internet connection to a new/fixed backend that allows forwarding the initial action and running it automatically once connected. (i.e., it'll allow you to set "Action when Wi-Fi is off" to "turn_on", and whatch stuff connect and do what you wanted automatically without having to re-click anywhere instead of showing you a Wi-Fi prompt and then not doing anything without any other feedback).
* Speaking of, fixed the "turn_on" beforeWifi action to, well, actually work. It's no longer marked as experimental.
* Consistently use "Wi-Fi" everywhere.
* On Kobo/Cervantes/Sony, implemented a "Kill Wi-Fi connection when inactive" system that will automatically disconnect from Wi-Fi after sustained *network* inactivity (i.e., you can keep reading, it'll eventually turn off on its own). This should be smart and flexible enough not to murder Wi-Fi while you need it, while still not keeping it uselessly on and murdering your battery.
(i.e., enable that + turn Wi-Fi on when off and enjoy never having to bother about Wi-Fi ever again).
* Made sending `NetworkConnected` / `NetworkDisconnected` events consistent (they were only being sent... sometimes, which made relying on 'em somewhat problematic).
* restoreWifiAsync is now only run when really needed (i.e., we no longer stomp on an existing working connection just for the hell of it).
* We no longer attempt to kill a bogus non-existent Wi-Fi connection when going to suspend, we only do it when it's actually needed.
* Every method of enabling Wi-Fi will now properly tear down Wi-Fi on failure, instead of leaving it in an undefined state.
* Fixed an issue in the fancy crash screen on Kobo/reMarkable that could sometime lead to the log excerpt being missing.
* Worked-around a number of sneaky issues related to low-level Wi-Fi/DHCP/DNS handling on Kobo (see the lengthy comments [below](https://github.com/koreader/koreader/pull/6424#issuecomment-663881059) for details). Fix #6421
Incidentally, this should also fix the inconsistencies experienced re: Wi-Fi behavior in Nickel when toggling between KOReader and Nickel (use NM/KFMon, and run a current FW for best results).
* For developers, this involves various cleanups around NetworkMgr and NetworkListener. Documentation is in-line, above the concerned functions.
2020-07-27 03:39:06 +02:00
|
|
|
"network_powersave",
|
2018-05-13 21:27:52 +02:00
|
|
|
"network_restore",
|
|
|
|
|
"network_info",
|
|
|
|
|
"network_before_wifi_action",
|
Various Wi-Fi QoL improvements (#6424)
* Revamped most actions that require an internet connection to a new/fixed backend that allows forwarding the initial action and running it automatically once connected. (i.e., it'll allow you to set "Action when Wi-Fi is off" to "turn_on", and whatch stuff connect and do what you wanted automatically without having to re-click anywhere instead of showing you a Wi-Fi prompt and then not doing anything without any other feedback).
* Speaking of, fixed the "turn_on" beforeWifi action to, well, actually work. It's no longer marked as experimental.
* Consistently use "Wi-Fi" everywhere.
* On Kobo/Cervantes/Sony, implemented a "Kill Wi-Fi connection when inactive" system that will automatically disconnect from Wi-Fi after sustained *network* inactivity (i.e., you can keep reading, it'll eventually turn off on its own). This should be smart and flexible enough not to murder Wi-Fi while you need it, while still not keeping it uselessly on and murdering your battery.
(i.e., enable that + turn Wi-Fi on when off and enjoy never having to bother about Wi-Fi ever again).
* Made sending `NetworkConnected` / `NetworkDisconnected` events consistent (they were only being sent... sometimes, which made relying on 'em somewhat problematic).
* restoreWifiAsync is now only run when really needed (i.e., we no longer stomp on an existing working connection just for the hell of it).
* We no longer attempt to kill a bogus non-existent Wi-Fi connection when going to suspend, we only do it when it's actually needed.
* Every method of enabling Wi-Fi will now properly tear down Wi-Fi on failure, instead of leaving it in an undefined state.
* Fixed an issue in the fancy crash screen on Kobo/reMarkable that could sometime lead to the log excerpt being missing.
* Worked-around a number of sneaky issues related to low-level Wi-Fi/DHCP/DNS handling on Kobo (see the lengthy comments [below](https://github.com/koreader/koreader/pull/6424#issuecomment-663881059) for details). Fix #6421
Incidentally, this should also fix the inconsistencies experienced re: Wi-Fi behavior in Nickel when toggling between KOReader and Nickel (use NM/KFMon, and run a current FW for best results).
* For developers, this involves various cleanups around NetworkMgr and NetworkListener. Documentation is in-line, above the concerned functions.
2020-07-27 03:39:06 +02:00
|
|
|
"network_after_wifi_action",
|
2018-07-07 17:06:58 +02:00
|
|
|
"network_dismiss_scan",
|
2018-05-13 21:27:52 +02:00
|
|
|
"----------------------------",
|
|
|
|
|
"ssh",
|
|
|
|
|
},
|
2019-02-28 18:32:11 +01:00
|
|
|
screen = {
|
|
|
|
|
"screensaver",
|
2021-02-05 12:56:31 +01:00
|
|
|
"coverimage",
|
2019-02-28 18:32:11 +01:00
|
|
|
"----------------------------",
|
2020-07-01 16:17:41 -04:00
|
|
|
"screen_rotation",
|
|
|
|
|
"----------------------------",
|
2019-02-28 18:32:11 +01:00
|
|
|
"screen_dpi",
|
|
|
|
|
"screen_eink_opt",
|
|
|
|
|
"color_rendering",
|
|
|
|
|
"----------------------------",
|
2019-07-26 23:04:20 +02:00
|
|
|
"screen_timeout",
|
2019-02-28 18:32:11 +01:00
|
|
|
"fullscreen",
|
|
|
|
|
},
|
2019-02-28 20:42:00 +01:00
|
|
|
taps_and_gestures = {
|
|
|
|
|
"gesture_manager",
|
2019-07-24 14:31:20 +02:00
|
|
|
"gesture_intervals",
|
2019-02-28 20:42:00 +01:00
|
|
|
"----------------------------",
|
|
|
|
|
"follow_links",
|
|
|
|
|
"----------------------------",
|
|
|
|
|
"menu_activate",
|
2019-09-19 16:51:47 +02:00
|
|
|
"ignore_hold_corners",
|
2019-02-28 20:42:00 +01:00
|
|
|
"screen_disable_double_tab",
|
|
|
|
|
},
|
2017-03-05 12:46:27 +01:00
|
|
|
tools = {
|
2017-04-06 02:12:35 -07:00
|
|
|
"read_timer",
|
2020-06-19 12:22:38 +02:00
|
|
|
"calibre",
|
2017-03-05 12:46:27 +01:00
|
|
|
"evernote",
|
|
|
|
|
"statistics",
|
|
|
|
|
"progress_sync",
|
2020-05-02 23:02:36 +02:00
|
|
|
"move_to_archive",
|
2018-10-16 19:49:44 +01:00
|
|
|
"wallabag",
|
2017-03-05 12:46:27 +01:00
|
|
|
"zsync",
|
2017-05-08 22:15:42 +02:00
|
|
|
"news_downloader",
|
2018-02-23 00:02:32 +01:00
|
|
|
"send2ebook",
|
2018-08-06 21:16:30 +02:00
|
|
|
"text_editor",
|
2020-11-04 18:59:39 +01:00
|
|
|
"qrclipboard",
|
2020-06-19 17:38:53 -04:00
|
|
|
"profiles",
|
2017-06-24 00:55:31 -07:00
|
|
|
"----------------------------",
|
2020-06-19 20:40:40 +02:00
|
|
|
"more_tools",
|
2017-06-24 00:55:31 -07:00
|
|
|
},
|
2020-06-19 20:40:40 +02:00
|
|
|
more_tools = {
|
2017-06-24 00:55:31 -07:00
|
|
|
"auto_frontlight",
|
|
|
|
|
"battery_statistics",
|
|
|
|
|
"synchronize_time",
|
|
|
|
|
"keep_alive",
|
2019-10-08 11:14:38 -04:00
|
|
|
"doc_setting_tweak",
|
2017-04-01 23:50:24 -07:00
|
|
|
"terminal",
|
2020-06-19 20:40:40 +02:00
|
|
|
"----------------------------",
|
|
|
|
|
"plugin_management",
|
2017-03-05 12:46:27 +01:00
|
|
|
},
|
|
|
|
|
search = {
|
|
|
|
|
"dictionary_lookup",
|
2017-10-07 22:13:46 +02:00
|
|
|
"dictionary_lookup_history",
|
2017-08-22 17:24:31 +02:00
|
|
|
"dictionary_settings",
|
2017-07-02 23:29:11 -07:00
|
|
|
"----------------------------",
|
2017-03-05 12:46:27 +01:00
|
|
|
"wikipedia_lookup",
|
2017-12-17 13:02:08 +01:00
|
|
|
"wikipedia_history",
|
2017-08-22 17:24:31 +02:00
|
|
|
"wikipedia_settings",
|
2017-04-06 14:56:40 +02:00
|
|
|
"----------------------------",
|
2018-12-17 14:15:13 +01:00
|
|
|
"translation_settings",
|
|
|
|
|
"----------------------------",
|
2017-04-06 14:56:40 +02:00
|
|
|
"goodreads",
|
|
|
|
|
"----------------------------",
|
2020-06-19 12:22:38 +02:00
|
|
|
"find_book_in_calibre_catalog",
|
2017-03-05 12:46:27 +01:00
|
|
|
"fulltext_search",
|
|
|
|
|
},
|
|
|
|
|
filemanager = {},
|
|
|
|
|
main = {
|
|
|
|
|
"history",
|
2018-07-07 13:03:33 +02:00
|
|
|
"open_previous_document",
|
|
|
|
|
"----------------------------",
|
2019-11-06 00:17:28 +01:00
|
|
|
"collections",
|
|
|
|
|
"----------------------------",
|
2017-03-05 12:46:27 +01:00
|
|
|
"book_status",
|
2017-07-01 12:11:44 +02:00
|
|
|
"book_info",
|
2017-03-05 12:46:27 +01:00
|
|
|
"----------------------------",
|
2020-08-29 05:20:28 +02:00
|
|
|
"mass_storage_actions", -- if Device:canToggleMassStorage()
|
2017-09-03 15:40:50 +02:00
|
|
|
"----------------------------",
|
2018-10-06 07:55:35 +02:00
|
|
|
"ota_update", -- if Device:hasOTAUpdates()
|
2017-03-05 12:46:27 +01:00
|
|
|
"help",
|
2017-05-14 18:43:08 +02:00
|
|
|
"----------------------------",
|
2017-09-03 15:40:50 +02:00
|
|
|
"exit_menu",
|
2017-03-05 12:46:27 +01:00
|
|
|
},
|
2017-04-03 23:52:47 +02:00
|
|
|
help = {
|
2017-04-15 14:45:56 +02:00
|
|
|
"quickstart_guide",
|
|
|
|
|
"----------------------------",
|
2017-04-03 23:52:47 +02:00
|
|
|
"report_bug",
|
|
|
|
|
"----------------------------",
|
2020-08-29 05:20:28 +02:00
|
|
|
"system_statistics", -- if enabled (Plugin)
|
|
|
|
|
"version",
|
2017-04-03 23:52:47 +02:00
|
|
|
"about",
|
|
|
|
|
},
|
2017-09-03 15:40:50 +02:00
|
|
|
exit_menu = {
|
2020-06-19 09:41:50 +02:00
|
|
|
"restart_koreader", -- if Device:canRestart()
|
2017-09-03 15:40:50 +02:00
|
|
|
"----------------------------",
|
2020-06-19 09:41:50 +02:00
|
|
|
"sleep", -- if Device:canSuspend()
|
|
|
|
|
"poweroff", -- if Device:canPowerOff()
|
|
|
|
|
"reboot", -- if Device:canReboot()
|
2017-09-03 15:40:50 +02:00
|
|
|
"----------------------------",
|
2020-06-19 09:41:50 +02:00
|
|
|
"start_bq", -- if Device:isCervantes()
|
2017-09-03 15:40:50 +02:00
|
|
|
"exit",
|
|
|
|
|
}
|
2017-03-05 12:46:27 +01:00
|
|
|
}
|
|
|
|
|
|
2020-06-19 09:41:50 +02:00
|
|
|
if not Device:hasExitOptions() then
|
2019-01-21 22:44:13 +01:00
|
|
|
order.exit_menu = nil
|
|
|
|
|
end
|
|
|
|
|
|
2017-03-05 12:46:27 +01:00
|
|
|
return order
|