Skip to content

Instantly share code, notes, and snippets.

@ebanDev
ebanDev / 2-foldercover.lua
Last active November 15, 2025 00:58
FolderCover patch for KOReader
--[[
FolderCover patch for KOReader (v3.0)
========================================
Features:
- Automatically detects cover images in directories
- Supports multiple image formats (jpg, jpeg, png, webp, gif)
- Configurable folder name and file count display with positioning options
- Rounded corners and proper image cropping
- Settings integration with BookInfoManager
-- based on https://gist.github.com/IntrovertedMage/d759ff214f799cfb5e1f8c85daab6cae and https://gist.github.com/sebdelsol/eba2e492473ac1f9e0ecb003d403b7de
-- Menu added in the Reader menu:
-- settings > Status bar > Progress bar > Thickness, height & colors > Read color
-- settings > Status bar > Progress bar > Thickness, height & colors > Unread color
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")
@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)