{"id":49340091,"url":"https://github.com/xusoo/shortcutstoolbar.koplugin","last_synced_at":"2026-04-27T03:05:12.386Z","repository":{"id":351401556,"uuid":"1210835674","full_name":"xusoo/shortcutstoolbar.koplugin","owner":"xusoo","description":"Shortcuts Toolbar for KOReader","archived":false,"fork":false,"pushed_at":"2026-04-14T20:13:28.000Z","size":175,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-14T22:15:52.290Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xusoo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-14T20:01:29.000Z","updated_at":"2026-04-14T22:12:34.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/xusoo/shortcutstoolbar.koplugin","commit_stats":null,"previous_names":["xusoo/shortcutstoolbar.koplugin"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/xusoo/shortcutstoolbar.koplugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xusoo%2Fshortcutstoolbar.koplugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xusoo%2Fshortcutstoolbar.koplugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xusoo%2Fshortcutstoolbar.koplugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xusoo%2Fshortcutstoolbar.koplugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xusoo","download_url":"https://codeload.github.com/xusoo/shortcutstoolbar.koplugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xusoo%2Fshortcutstoolbar.koplugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32320688,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-27T03:05:11.864Z","updated_at":"2026-04-27T03:05:12.381Z","avatar_url":"https://github.com/xusoo.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shortcuts Toolbar\n\nShortcuts Toolbar adds a configurable shortcut bar to KOReader's reader and file-browser menus.\n\n![Screenshot](screenshot.png)\n\nIt gives you quick access to common actions, optional reader information, and separate shortcut layouts for the reader and the file browser.\n\n## What the plugin does\n\n- Adds a toolbar to the reader menu.\n- Adds a toolbar to the file browser, either inside the menu or as a persistent top bar.\n- Can show book info, time, battery, and a back-to-library button in the reader.\n- Lets you enable, disable, and reorder built-in and custom shortcuts.\n- Supports custom shortcuts based on menu actions, dispatcher actions, or patch callbacks.\n- Includes a patch API for creating your custom shortcuts.\n\n## Available shortcuts\n\nReader-only shortcuts:\n\n- Font family settings\n- Bookmarks\n- Search\n- Table of contents\n- Page browser\n- Book status\n\nShared shortcuts:\n\n- Frontlight\n- Night mode\n- Wi-Fi\n- Time\n- Battery\n- Calendar statistics\n- Restart KOReader\n- Spacer\n\nFile-browser shortcuts:\n\n- Cloud storage\n- OPDS catalog\n- Favorites\n- Collections\n- File search\n\nBut you can also add your own custom shortcuts through the plugin's patch API or from the `Custom shortcuts` submenu.\n\n## Custom shortcuts\n\nCustom shortcuts can be added from the `Custom shortcuts` submenu.\n\nReader custom shortcuts are stored separately. File browser and SimpleUI custom shortcuts share the same list, so changes made from either place are reflected in both.\n\nEach custom shortcut can have its own name, icon, and action source.\n\nSupported action sources:\n\n- `System action`: runs a dispatcher action directly. Best for standard KOReader actions; limited to what the dispatcher exposes.\n- `Menu action`: records and replays a KOReader menu path. Works for any menu item without coding, but can break if the menu structure changes between versions.\n- `Patch callback`: executes a Lua callback registered by a startup patch. Most flexible option, but requires writing Lua code in a patch file.\n\n## Patch API\n\nThe patch API is documented in `PATCH_API.md` and a ready-to-copy example is included at `examples/2-shortcutstoolbar-custom-shortcut.lua.sample`.\n\nPatches register through KOReader's `userpatch` hook:\n\n```lua\nlocal userpatch = require(\"userpatch\")\n\nuserpatch.registerPatchPluginFunc(\"shortcutstoolbar\", function()\n    local ok, Shortcuts = pcall(require, \"custom_shortcut_manager\")\n    if not ok then return end\n\n    Shortcuts.ensureShortcut{\n        id = \"my_patch.hello\",\n        name = \"Hello\",\n        icon_file = Shortcuts.getBundledIcon(\"smile.svg\"),\n        callback = function(menu, shortcut)\n            -- your action here\n        end,\n    }\nend)\n```\n\nPatch API notes:\n\n- `Shortcuts.ensureShortcut{ ... }` creates or updates a patch-owned shortcut.\n- If `view` is omitted, the shortcut is registered for `reader`, `fb`, and `simpleui`.\n- `Shortcuts.deleteShortcut(\"my_patch.hello\")` removes a patch-owned shortcut.\n- Registered shortcuts still need to be enabled from `Configure shortcuts` for the relevant view.\n\n## SimpleUI integration\n\nWhen the SimpleUI plugin is installed, Shortcuts Toolbar can add a `Shortcuts Toolbar` module to the home screen.\n\nThe SimpleUI module provides:\n\n- A home-screen shortcut row.\n- Its own icon-size setting.\n- Its own shortcut selection.\n- The same custom shortcut list used by the file browser.\n\nSimpleUI module settings are available under `Home Screen -\u003e Modules -\u003e Module Settings`.\n\nPatch callbacks can also target the SimpleUI module by registering a shortcut with `view = \"simpleui\"` or by omitting `view` and letting the plugin register it for all supported views.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxusoo%2Fshortcutstoolbar.koplugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxusoo%2Fshortcutstoolbar.koplugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxusoo%2Fshortcutstoolbar.koplugin/lists"}