Skip to content

Commit bca4490

Browse files
committed
Article: zathura reader
1 parent f318ef2 commit bca4490

File tree

3 files changed

+163
-0
lines changed

3 files changed

+163
-0
lines changed

content/blog/zathura.md

+163
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
---
2+
author: Nimendra
3+
title: "Why I'm Going Back to Zathura reader"
4+
summary: "After trying various readers on Linux, I’m returning to Zathura for its speed, minimal UI, and distraction-free reading, using a customized Gruvbox theme and a script for quick file selection."
5+
description: "After trying various readers on Linux, I’m returning to Zathura for its speed, minimal UI."
6+
date: 2025-04-03
7+
lastmod: 2025-04-03
8+
tags: ["Linux","Readers", "tools"]
9+
categories: ["Tools"]
10+
showtoc: true
11+
TocOpen: false
12+
ShowReadingTime: true
13+
ShowPostNavLinks: true
14+
ShowBreadCrumbs: true
15+
ShowCodeCopyButtons: true
16+
editPost:
17+
URL: "https://github.com/nmdra/nmdra.github.io/tree/main/content"
18+
Text: "Suggest edit"
19+
appendFilePath: true
20+
---
21+
22+
Once upon a time, my reading flow was uninterrupted. No UI distractions, no sluggish loading times.
23+
24+
But then, I took a detour.
25+
26+
I needed **annotations**, so I switched to **[Okular](https://okular.kde.org/)**. It did the job, but over time, I realized something, I wasn’t really annotating PDFs much anymore. What I was doing, however, was reading a lot of EPUBs and Research Papers. And here, Okular fell apart. Its EPUB support? Let’s just say, it exists… barely.
27+
28+
### Trying Other EPUB Readers
29+
30+
So, I tried:
31+
32+
- **[Foliate](https://johnfactotum.github.io/foliate/)** – Beautiful UI, much better EPUB support, but slow.
33+
- **[Koodo Reader](https://koodo.960960.xyz/)** – Feature-rich, but again… slow.
34+
35+
And in the process, I realized: I didn’t want a bloated reader. I wanted **speed** and **focus**.
36+
37+
So, I’m back to **[Zathura](https://pwmt.org/projects/zathura/)**.
38+
39+
### My Zathura Workflow
40+
41+
I use Zathura with [`zathura-pdf-mupdf`](https://pwmt.org/projects/zathura-pdf-mupdf/) and the **[Gruvbox theme](https://github.com/eastack/zathura-gruvbox)** for a clean, eye-friendly look.
42+
43+
{{<figure src="/images/zathura-1.png" caption="Zathura Reader" alt="zathura preview" width= "100%" height="auto" align="center" >}}
44+
45+
{{<figure src="/images/zathura-2.png" caption="Index view" alt="zathura preview" width= "100%" height="auto" align="center" >}}
46+
47+
48+
### Configurations and Scripts
49+
50+
Here's my `zathurarc` configuration for a Gruvbox-themed experience:
51+
52+
```sh
53+
# ~/.config/zathurarc
54+
55+
# General Settings
56+
set guioptions "shv"
57+
set page-padding 1
58+
set adjust-open "best-fit"
59+
set window-height 3000
60+
set window-width 3000
61+
set scroll-wrap true
62+
set scroll-page-aware true
63+
set statusbar-home-tilde true
64+
set window-title-home-tilde true
65+
set statusbar-page-percent true
66+
set statusbar-basename true
67+
set incremental-search true
68+
set selection-clipboard "clipboard"
69+
set database "sqlite"
70+
71+
# Notification Settings
72+
set notification-error-bg "rgba(242,229,188,1)" # bg
73+
set notification-error-fg "rgba(157,0,6,1)" # bright:red
74+
set notification-warning-bg "rgba(242,229,188,1)" # bg
75+
set notification-warning-fg "rgba(181,118,20,1)" # bright:yellow
76+
set notification-bg "rgba(242,229,188,1)" # bg
77+
set notification-fg "rgba(121,116,14,1)" # bright:green
78+
79+
# Completion Settings
80+
set completion-bg "rgba(213,196,161,1)" # bg2
81+
set completion-fg "rgba(60,56,54,1)" # fg
82+
set completion-group-bg "rgba(235,219,178,1)" # bg1
83+
set completion-group-fg "rgba(146,131,116,1)" # gray
84+
set completion-highlight-bg "rgba(7,102,120,1)" # bright:blue
85+
set completion-highlight-fg "rgba(213,196,161,1)" # bg2
86+
87+
# Index Mode Settings
88+
set index-bg "rgba(213,196,161,1)" # bg2
89+
set index-fg "rgba(60,56,54,1)" # fg
90+
set index-active-bg "rgba(7,102,120,1)" # bright:blue
91+
set index-active-fg "rgba(213,196,161,1)" # bg2
92+
93+
# Input Bar Settings
94+
set inputbar-bg "rgba(242,229,188,1)" # bg
95+
set inputbar-fg "rgba(60,56,54,1)" # fg
96+
97+
# Status Bar Settings
98+
set statusbar-bg "rgba(213,196,161,1)" # bg2
99+
set statusbar-fg "rgba(60,56,54,1)" # fg
100+
101+
# Highlight Settings
102+
set highlight-color "rgba(181,118,20,0.5)" # bright:yellow
103+
set highlight-active-color "rgba(175,58,3,0.5)" # bright:orange
104+
105+
# Default Colors
106+
set default-bg "rgba(242,229,188,1)" # bg
107+
set default-fg "rgba(60,56,54,1)" # fg
108+
set render-loading true
109+
set render-loading-bg "rgba(242,229,188,1)" # bg
110+
set render-loading-fg "rgba(60,56,54,1)" # fg
111+
112+
# Recolor Book Content
113+
set recolor-lightcolor "rgba(242,229,188,1)" # bg
114+
set recolor-darkcolor "rgba(60,56,54,1)" # fg
115+
set recolor "true"
116+
set recolor-keephue "true" # keep original color
117+
118+
# Keybindings
119+
map r reload
120+
map R rotate
121+
map c recolor
122+
map p print
123+
map g goto top
124+
map <C-b> feedkeys ":bmark "
125+
map u follow
126+
map <Return> toggle_presentation
127+
map [presentation] <Return> toggle_presentation
128+
129+
# Index Mode
130+
map [index] i toggle_index
131+
map [index] <Tab> navigate_index toggle
132+
map [index] <ShiftTab> navigate_index expand-all
133+
```
134+
I use this script to open files.
135+
136+
```bash
137+
#!/bin/bash
138+
139+
# Select a book or paper using fd and fzf
140+
files=$(fd --follow --type f --extension pdf --extension epub | fzf --height 75% --reverse --no-info --multi --prompt "Select Book/Paper: ")
141+
142+
# Check if a selection was made
143+
if [[ -n "$files" ]]; then
144+
# Open each selected file
145+
while IFS= read -r file; do
146+
if [[ -f "$file" ]]; then
147+
nohup zathura "$file" >/dev/null 2>&1 &
148+
disown
149+
echo "Opened file: $file"
150+
else
151+
echo "Unknown selection: $file"
152+
fi
153+
done <<<"$files"
154+
else
155+
echo "No selection made."
156+
fi
157+
```
158+
---
159+
160+
Links:
161+
- [My Linux Config](https://github.com/nmdra/Dotfiles)
162+
- [Zathura-Archwiki](https://wiki.archlinux.org/title/Zathura)
163+
- [zathurarc manpage](https://man.cx/zathurarc(5))

static/images/zathura-1.png

524 KB
Loading

static/images/zathura-2.png

152 KB
Loading

0 commit comments

Comments
 (0)