literate-dotfiles/zathura.org
Thomas Dehaeze 3e97711adc Change indentation of all blocks.
Use (setq org-src-preserve-indentation t) for Emacs.
2021-01-08 01:26:27 +01:00

2.4 KiB

Zathura

Configuration

# Use clipboard
set selection-clipboard clipboard

# Remove padding
set statusbar-h-padding 0
set statusbar-v-padding 0

# Padding between pages
set page-padding 1

# Use Synctex with Emasc
set synctex true

Bindings

map u scroll half-up
map d scroll half-down

map D toggle_page_mode

map r reload
map R rotate
map > rotate
map < rotate

map L zoom in
map H zoom out

map i recolor
map p print

map t toggle_statusbar

map <Space> scroll full-down
map <BackSpace> scroll full-up
map <C-s> feedkeys ":exec /home/thomas/.config/zathura/scripts/extract-pdf-page.sh $FILE<Return>"

Colors

# Base16 Gruvbox dark, soft
# Author: Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox)

set default-bg                  "#32302f"
set default-fg                  "#3c3836"

set statusbar-fg                "#bdae93"
set statusbar-bg                "#504945"

set inputbar-bg                 "#32302f"
set inputbar-fg                 "#fbf1c7"

set notification-bg             "#32302f"
set notification-fg             "#fbf1c7"

set notification-error-bg       "#32302f"
set notification-error-fg       "#fb4934"

set notification-warning-bg     "#32302f"
set notification-warning-fg     "#fb4934"

set highlight-color             "#fabd2f"
set highlight-active-color      "#83a598"

set completion-bg               "#3c3836"
set completion-fg               "#83a598"

set completion-highlight-fg     "#fbf1c7"
set completion-highlight-bg     "#83a598"

set recolor-lightcolor          "#32302f"
set recolor-darkcolor           "#ebdbb2"

set recolor                     "false"
set recolor-keephue             "false"

Scripts

Extract one page as a PDF

tmpfile=/tmp/pdf_page.pdf

# Ask for page number
# Ideally would get the page from Zathura...
pagenum=$(rofi -dmenu -p "Page Number")

pdftk $1 cat $pagenum output $tmpfile.pdf && \
    pdf2svg $tmpfile.pdf $tmpfile.svg && \
    inkscape $tmpfile.svg