Skip to content
Nico Hirsch edited this page Aug 4, 2024 · 31 revisions

Overview

It is possible to add or change some provided features in KOReader by user patches (introduced in https://github.com/koreader/koreader/pull/9104).

For implementing or applying such patches only limited support might be given by the KOReader developers.

Installation

It is necessary to create a subfolder named patches in the koreader folder. (On Android this folder is located on the SD-card.)

The patch can than be put into a file in koreader\patches. The content of the file has to be Lua code and the extension of the file as to be .lua

The name of a patch has to start witch a number followed by a minus (1234-name-of-the-patch.lua).

The execution time of a patch is determined by the first digit of the number in the patch name. If there are several patches starting with the same digit, the execution order is the natural order (1<10<11<12<13<...<109<...<10010).

Names starting with:

  • 0 are executed very early and only once after an update,
  • 1 are executed very early on every start of KOReader (but after 0 if applicable),
  • 2 are executed after UIManager is ready on every start of KOReader,
  • 3-7 reserved
  • 8 are executed before exit and before settings get saved,
  • 9 are executed right before exit.

Known limitations

  • On Android user patches don't work in the FDroid version of KOReader. The package id for such version is org.koreader.launcher.fdroid and it is installed either from FDroid application or using the apk file available at the mentioned page. You have to manually install the release version that has the package id org.koreader.launcher

Notable patches

Device independent

Device specific

Kobo

  • 2-disable-hw-invert.lua: disables hardware inversion for nightmode, in case it's unreliable on your device (generally, really old devices).
  • 2-toggle-usbnet.lua: adds an entry in the Network menu to toggle usbnet.

Usage

Basic reading controls (click to open)
Advanced reading controls (click to open)
Clone this wiki locally