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"] = {
|
2018-04-06 09:32:54 +00:00
|
|
|
"filemanager_settings",
|
2017-03-05 11:46:27 +00:00
|
|
|
"setting",
|
|
|
|
"tools",
|
|
|
|
"search",
|
2018-03-26 17:41:50 +00:00
|
|
|
"plus_menu",
|
2017-03-05 11:46:27 +00:00
|
|
|
"main",
|
|
|
|
},
|
2018-04-06 09:32:54 +00:00
|
|
|
filemanager_settings = {
|
2017-08-17 17:34:36 +00:00
|
|
|
"filemanager_display_mode",
|
2021-02-09 11:41:17 +00:00
|
|
|
"filebrowser_settings",
|
2017-03-05 11:46:27 +00:00
|
|
|
"----------------------------",
|
|
|
|
"sort_by",
|
|
|
|
"reverse_sorting",
|
|
|
|
"----------------------------",
|
2017-08-14 11:15:12 +00:00
|
|
|
"start_with",
|
2018-04-06 09:32:54 +00:00
|
|
|
},
|
|
|
|
setting = {
|
2017-03-05 11:46:27 +00:00
|
|
|
-- common settings
|
|
|
|
-- those that don't exist will simply be skipped during menu gen
|
|
|
|
"frontlight", -- if Device:hasFrontlight()
|
|
|
|
"night_mode",
|
|
|
|
"----------------------------",
|
|
|
|
"network",
|
|
|
|
"screen",
|
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
|
|
|
-- end common settings
|
|
|
|
},
|
2021-10-23 10:13:05 +00:00
|
|
|
document = {
|
|
|
|
"document_auto_save",
|
|
|
|
"document_save",
|
|
|
|
"document_end_action",
|
2021-10-23 10:13:09 +00:00
|
|
|
"language_support",
|
2021-10-23 10:13:05 +00:00
|
|
|
},
|
2018-08-11 20:47:33 +00:00
|
|
|
device = {
|
2019-09-07 18:49:44 +00:00
|
|
|
"keyboard_layout",
|
2022-10-29 20:46:35 +00:00
|
|
|
"external_keyboard",
|
2022-01-25 00:08:33 +00:00
|
|
|
"font_ui_fallbacks",
|
|
|
|
"----------------------------",
|
2018-08-11 20:47:33 +00:00
|
|
|
"time",
|
2022-07-05 13:38:59 +00:00
|
|
|
"units",
|
2021-06-29 12:07:29 +00:00
|
|
|
"device_status_alarm",
|
2020-10-21 23:17:34 +00:00
|
|
|
"charging_led", -- if Device:canToggleChargingLED()
|
2020-08-31 22:23:09 +00:00
|
|
|
"autostandby",
|
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",
|
2020-11-04 18:15:07 +00:00
|
|
|
"ignore_battery_optimizations",
|
2020-10-21 23:17:34 +00:00
|
|
|
"mass_storage_settings", -- if Device:canToggleMassStorage()
|
2020-09-01 14:39:47 +00:00
|
|
|
"file_ext_assoc",
|
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",
|
2020-11-03 21:51:11 +00:00
|
|
|
"back_in_reader",
|
2022-01-23 17:40:37 +00:00
|
|
|
"backspace_as_back",
|
|
|
|
"----------------------------",
|
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",
|
2020-06-15 05:43:37 +00:00
|
|
|
"android_back_button",
|
2019-02-28 21:38:24 +00:00
|
|
|
"----------------------------",
|
2021-05-31 18:28:43 +00:00
|
|
|
"opening_page_location_stack",
|
2019-02-28 21:38:24 +00:00
|
|
|
},
|
2018-05-13 19:27:52 +00: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 01:39:06 +00:00
|
|
|
"network_powersave",
|
2018-05-13 19:27:52 +00: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 01:39:06 +00:00
|
|
|
"network_after_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",
|
2022-06-01 21:18:48 +00:00
|
|
|
"autodim",
|
2019-02-28 17:32:11 +00:00
|
|
|
"----------------------------",
|
2020-07-01 20:17:41 +00:00
|
|
|
"screen_rotation",
|
|
|
|
"----------------------------",
|
2019-02-28 17:32:11 +00:00
|
|
|
"screen_dpi",
|
|
|
|
"screen_eink_opt",
|
2021-09-25 09:02:10 +00:00
|
|
|
"autowarmth",
|
2019-02-28 17:32:11 +00:00
|
|
|
"color_rendering",
|
|
|
|
"----------------------------",
|
2019-07-26 21:04:20 +00:00
|
|
|
"screen_timeout",
|
2019-02-28 17:32:11 +00:00
|
|
|
"fullscreen",
|
2021-05-22 18:45:06 +00:00
|
|
|
"----------------------------",
|
|
|
|
"screen_notification",
|
2019-02-28 17:32:11 +00:00
|
|
|
},
|
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
|
|
|
"----------------------------",
|
2019-09-19 14:51:47 +00:00
|
|
|
"ignore_hold_corners",
|
2019-02-28 19:42:00 +00:00
|
|
|
"screen_disable_double_tab",
|
2021-09-11 09:04:48 +00:00
|
|
|
"----------------------------",
|
|
|
|
"menu_activate",
|
2019-02-28 19:42:00 +00:00
|
|
|
},
|
2017-03-05 11:46:27 +00:00
|
|
|
tools = {
|
2020-06-19 10:22:38 +00:00
|
|
|
"calibre",
|
2021-08-30 07:11:23 +00:00
|
|
|
"exporter",
|
2017-03-05 11:46:27 +00:00
|
|
|
"statistics",
|
2020-05-02 21:02:36 +00:00
|
|
|
"move_to_archive",
|
2017-03-05 11:46:27 +00:00
|
|
|
"cloud_storage",
|
2017-03-27 04:42:58 +00:00
|
|
|
"read_timer",
|
2018-10-16 18:49:44 +00:00
|
|
|
"wallabag",
|
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",
|
2020-07-14 21:39:03 +00:00
|
|
|
"profiles",
|
2020-11-04 17:59:39 +00:00
|
|
|
"qrclipboard",
|
2017-06-24 07:55:31 +00:00
|
|
|
"----------------------------",
|
2020-06-19 18:40:40 +00:00
|
|
|
"more_tools",
|
2017-03-05 11:46:27 +00:00
|
|
|
},
|
2020-06-19 18:40:40 +00:00
|
|
|
more_tools = {
|
2017-06-24 07:55:31 +00:00
|
|
|
"auto_frontlight",
|
|
|
|
"battery_statistics",
|
2021-09-09 20:28:32 +00:00
|
|
|
"book_shortcuts",
|
2017-06-24 07:55:31 +00:00
|
|
|
"synchronize_time",
|
|
|
|
"keep_alive",
|
2019-10-08 15:14:38 +00:00
|
|
|
"doc_setting_tweak",
|
2017-06-24 07:55:31 +00:00
|
|
|
"terminal",
|
2020-06-19 18:40:40 +00:00
|
|
|
"----------------------------",
|
|
|
|
"plugin_management",
|
|
|
|
"advanced_settings",
|
|
|
|
"developer_options",
|
2017-06-24 07:55:31 +00:00
|
|
|
},
|
2017-03-05 11:46:27 +00:00
|
|
|
search = {
|
|
|
|
"dictionary_lookup",
|
2017-10-07 20:13:46 +00:00
|
|
|
"dictionary_lookup_history",
|
2022-06-12 19:34:17 +00:00
|
|
|
"vocabbuilder",
|
2017-08-22 15:24:31 +00:00
|
|
|
"dictionary_settings",
|
2017-07-03 06:29:11 +00:00
|
|
|
"----------------------------",
|
2017-05-12 16:28:42 +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-05-12 16:28:42 +00:00
|
|
|
"----------------------------",
|
2017-03-05 11:46:27 +00:00
|
|
|
"find_book_in_calibre_catalog",
|
|
|
|
"find_file",
|
|
|
|
"----------------------------",
|
2021-02-15 08:28:41 +00:00
|
|
|
"opds",
|
2017-03-05 11:46:27 +00:00
|
|
|
},
|
|
|
|
main = {
|
|
|
|
"history",
|
|
|
|
"open_last_document",
|
|
|
|
"----------------------------",
|
2019-11-05 23:17:28 +00:00
|
|
|
"collections",
|
|
|
|
"----------------------------",
|
2020-08-29 03:20:28 +00:00
|
|
|
"mass_storage_actions", -- if Device:canToggleMassStorage()
|
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
|
|
|
"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",
|
|
|
|
"----------------------------",
|
2020-08-29 03:20:28 +00:00
|
|
|
"system_statistics", -- if enabled (Plugin)
|
|
|
|
"version",
|
2017-04-03 21:52:47 +00:00
|
|
|
"about",
|
|
|
|
},
|
2018-03-26 17:41:50 +00:00
|
|
|
plus_menu = {},
|
2017-09-03 13:40:50 +00:00
|
|
|
exit_menu = {
|
2020-06-19 07:41:50 +00:00
|
|
|
"restart_koreader", -- if Device:canRestart()
|
2017-09-03 13:40:50 +00:00
|
|
|
"----------------------------",
|
2020-06-19 07:41:50 +00:00
|
|
|
"sleep", -- if Device:canSuspend()
|
|
|
|
"poweroff", -- if Device:canPowerOff()
|
|
|
|
"reboot", -- if Device:canReboot()
|
2017-09-03 13:40:50 +00:00
|
|
|
"----------------------------",
|
2020-06-19 07:41:50 +00:00
|
|
|
"start_bq", -- if Device:isCervantes()
|
2017-09-03 13:40:50 +00:00
|
|
|
"exit",
|
|
|
|
}
|
2017-03-05 11:46:27 +00:00
|
|
|
}
|
|
|
|
|
2020-06-19 07:41:50 +00:00
|
|
|
if not Device:hasExitOptions() then
|
2019-01-21 21:44:13 +00:00
|
|
|
order.exit_menu = nil
|
|
|
|
end
|
2017-03-05 11:46:27 +00:00
|
|
|
return order
|