literate-dotfiles/dotfiles/zathura.org

119 lines
2.9 KiB
Org Mode
Raw Normal View History

2019-12-30 17:21:22 +01:00
#+TITLE: Zathura
:DRAWER:
2020-01-11 22:04:28 +01:00
#+STARTUP: overview
#+LANGUAGE: en
#+EMAIL: dehaeze.thomas@gmail.com
#+AUTHOR: Dehaeze Thomas
#+HTML_LINK_HOME: ./index.html
#+HTML_LINK_UP: ./index.html
2020-01-11 22:24:51 +01:00
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="./css/htmlize.css"/>
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="./css/readtheorg.css"/>
#+HTML_HEAD: <script type="text/javascript" src="./js/jquery.min.js"></script>
#+HTML_HEAD: <script type="text/javascript" src="./js/bootstrap.min.js"></script>
#+HTML_HEAD: <script type="text/javascript" src="./js/jquery.stickytableheaders.min.js"></script>
#+HTML_HEAD: <script type="text/javascript" src="./js/readtheorg.js"></script>
2020-01-11 22:04:28 +01:00
2019-12-30 17:21:22 +01:00
#+PROPERTY: header-args :comments no
#+PROPERTY: header-args+ :mkdirp yes
#+PROPERTY: header-args+ :tangle ~/.config/zathura/zathurarc
:END:
* Configuration
#+BEGIN_SRC conf
2020-11-03 11:30:40 +01:00
# Use clipboard
set selection-clipboard clipboard
2019-12-30 17:21:22 +01:00
2020-11-03 11:30:40 +01:00
# Remove padding
set statusbar-h-padding 0
set statusbar-v-padding 0
2019-12-30 17:21:22 +01:00
2020-11-03 11:30:40 +01:00
# Padding between pages
set page-padding 1
2019-12-30 17:21:22 +01:00
#+END_SRC
* Bindings
#+BEGIN_SRC conf
2020-11-03 11:30:40 +01:00
map u scroll half-up
map d scroll half-down
2019-12-30 17:21:22 +01:00
2020-11-03 11:30:40 +01:00
map D toggle_page_mode
2019-12-30 17:21:22 +01:00
2020-11-03 11:30:40 +01:00
map r reload
map R rotate
map > rotate
map < rotate
2019-12-30 17:21:22 +01:00
2020-11-03 11:30:40 +01:00
map L zoom in
map H zoom out
2019-12-30 17:21:22 +01:00
2020-11-03 11:30:40 +01:00
map i recolor
map p print
2019-12-30 17:21:22 +01:00
2020-11-03 11:30:40 +01:00
map t toggle_statusbar
2019-12-30 17:21:22 +01:00
2020-11-03 11:30:40 +01:00
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>"
2019-12-30 17:21:22 +01:00
#+END_SRC
* Colors
#+begin_src conf
2020-11-03 11:30:40 +01:00
# Base16 Gruvbox dark, soft
# Author: Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox)
2019-12-30 17:21:22 +01:00
2020-11-03 11:30:40 +01:00
set default-bg "#32302f"
set default-fg "#3c3836"
2019-12-30 17:21:22 +01:00
2020-11-03 11:30:40 +01:00
set statusbar-fg "#bdae93"
set statusbar-bg "#504945"
2019-12-30 17:21:22 +01:00
2020-11-03 11:30:40 +01:00
set inputbar-bg "#32302f"
set inputbar-fg "#fbf1c7"
2019-12-30 17:21:22 +01:00
2020-11-03 11:30:40 +01:00
set notification-bg "#32302f"
set notification-fg "#fbf1c7"
2019-12-30 17:21:22 +01:00
2020-11-03 11:30:40 +01:00
set notification-error-bg "#32302f"
set notification-error-fg "#fb4934"
2019-12-30 17:21:22 +01:00
2020-11-03 11:30:40 +01:00
set notification-warning-bg "#32302f"
set notification-warning-fg "#fb4934"
2019-12-30 17:21:22 +01:00
2020-11-03 11:30:40 +01:00
set highlight-color "#fabd2f"
set highlight-active-color "#83a598"
2019-12-30 17:21:22 +01:00
2020-11-03 11:30:40 +01:00
set completion-bg "#3c3836"
set completion-fg "#83a598"
2019-12-30 17:21:22 +01:00
2020-11-03 11:30:40 +01:00
set completion-highlight-fg "#fbf1c7"
set completion-highlight-bg "#83a598"
2019-12-30 17:21:22 +01:00
2020-11-03 11:30:40 +01:00
set recolor-lightcolor "#32302f"
set recolor-darkcolor "#ebdbb2"
2019-12-30 17:21:22 +01:00
2020-11-03 11:30:40 +01:00
set recolor "false"
set recolor-keephue "false"
#+end_src
* Scripts
:PROPERTIES:
:header-args: :shebang "#!/usr/bin/env bash"
:header-args+: :comments both :mkdirp yes
:END:
** Extract one page as a PDF
#+begin_src bash :tangle ~/.config/zathura/scripts/extract-pdf-page.sh
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
2019-12-30 17:21:22 +01:00
#+end_src