Skip to content

Instantly share code, notes, and snippets.

@IntrovertedMage
IntrovertedMage / 2-change-status-bar-color.lua
Last active September 26, 2025 17:37
KOReader custom status bar color user patch, implements color persitance when changing style fix by @sebdelsol https://gist.github.com/sebdelsol/eba2e492473ac1f9e0ecb003d403b7de
local readerFooter = require("apps/reader/modules/readerfooter")
local ProgressWidget = require("ui/widget/progresswidget")
local BD = require("ui/bidi")
local Blitbuffer = require("ffi/blitbuffer")
local Geom = require("ui/geometry")
local Math = require("optmath")
local Screen = require("device").screen
-- Somewhat empirically chosen threshold to switch between the two designs ;o)
local INITIAL_MARKER_HEIGHT_THRESHOLD = Screen:scaleBySize(12)
@IntrovertedMage
IntrovertedMage / 2-use-deepl-for-translation.lua
Last active November 19, 2025 21:26
A KOReader user patch to use DeepLs api for translation instead of google translates api. Demonstration: https://imgur.com/a/zTG3EUn
--SETTINGS--========================================
local api_key = "ENTER API KEY HERE"
local USE_FOR_TRANSLATION = true
local USE_FOR_DETECTION = true
local SHOW_DEEPL_LANGUAGES_AS_OPTIONS = true
-------------=========================