Skip to content
silvaivaniltoPublic

About

A native Wayland PDF and EPUB reader for Omarchy, built in Rust with GPUI and MuPDF

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Omareader

A native Wayland PDF and EPUB reader for Omarchy, built in Rust with GPUI and MuPDF. Keyboard first, follows your Omarchy theme, font and language live, and draws its icon in the theme's colors like Omarchy's own apps.

Omareader reading a CC0 sample

The library, with recent documents, bookmarks and highlights

Install

curl -fsSL https://raw.githubusercontent.com/silvaivanilto/omareader/main/install.sh | bash

The installer downloads the latest release for x86-64 and installs it under ~/.local (binary, desktop entry, icon and licenses), adds the icon to Omarchy's Papercraft set and makes Omareader the default PDF and EPUB reader. Where no prebuilt release fits, it builds from source instead (needs rustup or cargo). Run it again to update; install.sh --uninstall removes it.

From a clone:

make install PREFIX="$HOME/.local"

What it does

  • Reading. PDF and EPUB through the bundled MuPDF engine. Single page, two-page spread, continuous vertical and horizontal layouts; smooth scrolling, zoom around the cursor, fit to width or page, tabs or windows, dark pages, and Omarchy paper and ink colors for documents (photos and colored figures stay as they are).
  • Presentation mode. F5 shows one page at a time, full screen on black. Arrows, Space, PageDown and clicks move on; type a number and Enter to jump; b blanks the screen; Esc returns where you were.
  • Printing. Ctrl+P opens the desktop's print dialog. Highlights are printed in place, books are laid out as PDF first, and the original file is never touched.
  • Search. Live search with case, whole-word and regex options, result snippets, and background indexing so large documents open instantly.
  • Annotations. Bookmarks, highlights in 26 colors with comments, underline and strikeout; import a PDF's own annotations, or export a copy with yours embedded.
  • Books. Native EPUB pagination with adjustable text size, line spacing and page width; reading positions and highlights survive reflow.
  • Research. Table of contents, internal links, marks, back/forward history, page previews, portals between documents and a reading ruler.
  • Library. Recent documents with covers, reading positions and annotations kept in one JSON file, with backup (:export) and merge (:import).

Keyboard

Key Action
j / k, arrows Scroll
Space / Shift+Space Half a screen down / up
gg / G First / last page
+ / - Zoom
w / f Fit width / whole page
L Cycle layouts
t Contents
/ or Ctrl+F Search
n / N Next / previous match
b / B Add / list bookmarks
h / H Add / list highlights
Backspace Previous location
Ctrl+O / O Open a file / recent documents
Ctrl+P Print
F5 Present
: / Ctrl+Shift+P Command prompt / palette
Ctrl+, Settings (Tab or 1–5 switch sections)
F8 / F11 Dark pages / fullscreen
? / F1 Every shortcut
q / Ctrl+Q Quit

Every key can be rebound; see the default keybindings and the command reference.

Settings

Ctrl+, opens the settings, grouped as General, Reading, Books, Annotations and Advanced. Everything is also a line in a plain text file:

Contents Location
Preferences ~/.config/omareader/prefs_user.config
Keybindings ~/.config/omareader/keys_user.config
Library (positions, bookmarks, highlights) ~/.local/share/omareader/library.json
# prefs_user.config
page_layout vertical
document_theme 1
epub_font_size 14
highlight_color_a 0.94 0.64 1.0

Edits apply live; an invalid edit keeps the last working configuration. The default preferences list every name and value.

Command line

omareader paper.pdf --page 12
omareader first.pdf second.pdf
omareader paper.pdf --execute-command 'search compiler'
omareader --inspect book.epub
omareader --config /tmp/settings --library /tmp/library.json paper.pdf

A second launch hands its documents to the running window. --execute-command is repeatable and also reaches a running window, which is how scripts and agents drive it.

Development

make check   # cargo fmt --check and clippy -D warnings
make test    # cargo test
make build   # release build in target/release/omareader

Building needs Rust, a C/C++ toolchain, pkg-config, clang and the Wayland and xkbcommon development headers. The scripts in scripts/ drive the real window on Hyprland with an isolated library. After changing the dispatcher or assets/command_docs.json, run python3 scripts/command_inventory.py.

The sample documents in examples/ are original and CC0; regenerate them with python3 scripts/generate_examples.py.

License

GPL-3.0-or-later. MuPDF is AGPL-3.0, so the combined program is distributed under its terms; GPUI, the fonts and the icons keep their own licenses. See LICENSE and THIRD_PARTY.md.

Thanks

Omareader grew out of Omapdf by Sokpiseth Thin, itself inspired by Sioyek. Thank you both.

About

A native Wayland PDF and EPUB reader for Omarchy, built in Rust with GPUI and MuPDF

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages