1# Being an Emacs user, it is natural for me to use emacs-like and info-like keybindings for zathura. 2# 3# Zathura configuration documentation is available at 4# https://git.pwmt.org/pwmt/zathura/-/blob/e5d2ca487147e79d0bb7acbf5174cd9dcc92a86c/doc/man/zathurarc.5.rst 5# A full list of available functions and default keybindings is available at 6# https://git.pwmt.org/pwmt/zathura/-/blob/e5d2ca487147e79d0bb7acbf5174cd9dcc92a86c/zathura/config.c#L301 7# 8# If you want to integrate Zathura with Emacs AUCTeX mode, see 9# [emacs wiki](https://www.emacswiki.org/emacs/AUCTeX). 10# 11# Put the following inside `$XDG_CONFIG_HOME/zathura/zathurarc 12 13## niceties 14# when selecting text with mouse, 15# copy to clipboard 16setselection-clipboardclipboard 17 18# keep several lines of text when 19# scrolling a screenful 20setscroll-full-overlap0.2 21 22# see documentation for details 23setscroll-page-awaretrue 24setwindow-title-basenametrue 25setadjust-openwidth 26setstatusbar-home-tildetrue 27setvertical-centertrue 28setsynctextrue 29# large bold font easier on the eyes in index mode 30# status bar can be disabled with A-s 31setfont"FreeSans bold 16" 32setzoom-step3 33 34map[normal]<C-b>scrollleft 35map[normal]<C-n>scrolldown 36map[normal]<C-p>scrollup 37map[normal]<C-f>scrollright 38map[normal]<C-g>abort 39map[insert]<C-g>abort 40map[normal]<C-[>abort 41map[normal]<A-\<>gototop 42map[normal]<A-\>>gotobottom 43map[normal]aadjust_windowbest-fit 44map[normal]sadjust_windowwidth 45map[normal]Fdisplay_link 46map[normal]<C-c>copy_link 47map[normal]ffollow 48map[normal]mmark_add 49map[normal] \' mark_evaluate 50map[normal] \,navigatenext 51map[normal] \.navigateprevious 52map[normal]<A-Right>navigatenext 53map[normal]<A-Left>navigateprevious 54map[normal]<PageDown>scrollfull-down 55map[normal]<PageUp>scrollfull-up 56map[normal]<C-P>print 57map[normal]crecolor 58map[normal]Rreload 59map[normal]vrotaterotate_cw 60map[normal]Vrotaterotate_ccw 61map[normal]<Left>scrollleft 62map[normal]<Up>scrollup 63map[normal]<Down>scrolldown 64map[normal]<Right>scrollright 65map[normal]<A-a>scrollhalf-left 66map[normal]<C-V>scrollhalf-down 67map[normal]<A-V>scrollhalf-up 68map[normal]<A-e>scrollhalf-right 69map[normal]<C-a>scrollfull-left 70map[normal]<C-v>scrollfull-down 71map[normal]<Return>scrollfull-down 72map[normal]<A-v>scrollfull-up 73map[normal]<C-e>scrollfull-right 74map[normal]<Space>scrollfull-down 75map[normal]<C-h>scrollfull-up 76map[normal]<BackSpace>scrollfull-up 77map[normal]<S-Space>scrollfull-up 78map[normal]ljumplistbackward 79map[normal]rjumplistforward 80map[normal]<A-r>bisectforward 81map[normal]<A-l>bisectbackward 82# still need to use '/' to trigger search 83map[normal]<C-s>searchforward 84map[normal]<C-r>searchbackward 85map[normal]psnap_to_page 86map[normal]<C-i>toggle_index 87map[normal]itoggle_index 88map[normal]<Tab>toggle_index 89map[normal]<A-s>toggle_statusbar 90map[normal]<A-i>focus_inputbar 91map[normal]dtoggle_page_mode 92map[normal]qquit 93map[normal]+zoomin 94map[normal]-zoomout 95map[normal]=zoomin 96map[normal]<A-P>toggle_presentation 97map[normal]<A-F>toggle_fullscreen 98map[normal]jtoggle_fullscreen 99map[fullscreen]jtoggle_fullscreen100map[fullscreen]qtoggle_fullscreen101map[fullscreen]<C-b>scrollleft102map[fullscreen]<C-n>scrolldown103map[fullscreen]<C-p>scrollup104map[fullscreen]<C-f>scrollright105map[fullscreen]<C-g>abort106map[fullscreen]<C-[>abort107map[fullscreen]<A-\<>gototop108map[fullscreen]<A-\>>gotobottom109map[fullscreen]aadjust_windowbest-fit110map[fullscreen]sadjust_windowwidth111map[fullscreen]Fdisplay_link112map[fullscreen]<C-c>copy_link113map[fullscreen]ffollow114map[fullscreen]mmark_add115map[fullscreen] \' mark_evaluate116map[fullscreen] \,navigatenext117map[fullscreen] \.navigateprevious118map[fullscreen]<A-Right>navigatenext119map[fullscreen]<A-Left>navigateprevious120map[fullscreen]<PageDown>scrollfull-down121map[fullscreen]<PageUp>scrollfull-up122map[fullscreen]<C-P>print123map[fullscreen]crecolor124map[fullscreen]Rreload125map[fullscreen]vrotaterotate_cw126map[fullscreen]Vrotaterotate_ccw127map[fullscreen]<Left>scrollleft128map[fullscreen]<Up>scrollup129map[fullscreen]<Down>scrolldown130map[fullscreen]<Right>scrollright131map[fullscreen]<A-a>scrollhalf-left132map[fullscreen]<C-V>scrollhalf-down133map[fullscreen]<A-V>scrollhalf-up134map[fullscreen]<A-e>scrollhalf-right135map[fullscreen]<C-a>scrollfull-left136map[fullscreen]<C-v>scrollfull-down137map[fullscreen]<Return>scrollfull-down138map[fullscreen]<A-v>scrollfull-up139map[fullscreen]<C-e>scrollfull-right140map[fullscreen]<Space>scrollfull-down141map[fullscreen]<C-h>scrollfull-up142map[fullscreen]<BackSpace>scrollfull-up143map[fullscreen]<S-Space>scrollfull-up144map[fullscreen]ljumplistbackward145map[fullscreen]rjumplistforward146map[fullscreen]<A-r>bisectforward147map[fullscreen]<A-l>bisectbackward148map[fullscreen]<C-s>searchforward149map[fullscreen]<C-r>searchbackward150map[fullscreen]psnap_to_page151map[fullscreen]itoggle_index152map[fullscreen]<C-i>toggle_index153map[fullscreen]<Tab>toggle_index154map[fullscreen]<A-s>toggle_statusbar155map[fullscreen]<A-i>focus_inputbar156map[fullscreen]dtoggle_page_mode157map[fullscreen]+zoomin158map[fullscreen]-zoomout159map[fullscreen]=zoomin160# status bar will obscure last item in index mode161map[index]<A-s>toggle_statusbar162map[index]qtoggle_index163map[index]itoggle_index164map[index]<C-p>navigate_indexup165map[index]<C-h>navigate_indexup166map[index]<BackSpace>navigate_indexup167map[index]<C-n>navigate_indexdown168map[index]<A-v>navigate_indexup169map[index]<C-v>navigate_indexdown170map[index] \<navigate_indextop171map[index] \>navigate_indexbottom172map[index]<A-\<>navigate_indextop173map[index]<A-\>>navigate_indexbottom174map[index]<C-b>navigate_indexcollapse175map[index]<C-f>navigate_indexexpand176map[index]<C-i>navigate_indexexpand-all177map[index]<A-i>navigate_indexcollapse-all178map[index]<Up>navigate_indexup179map[index]<Down>navigate_indexdown180map[index]<Left>navigate_indexcollapse181map[index]<Right>navigate_indexexpand182map[index]<C-m>navigate_indexselect183map[index]<Space>navigate_indexselect184map[index]<Return>navigate_indexselect185map[index]<C-j>navigate_indexselect186map[index]<Esc>toggle_index187map[index]<C-[>toggle_index188map[index]<C-g>toggle_index189map[index]<C-c>toggle_index190map[presentation]itoggle_index191map[presentation]rnavigatenext192map[presentation]<Down>navigatenext193map[presentation]<Right>navigatenext194map[presentation]<PageDown>navigatenext195map[presentation]<Space>navigatenext196map[presentation]lnavigateprevious197map[presentation]<Left>navigateprevious198map[presentation]<Up>navigateprevious199map[presentation]<PageUp>navigateprevious200map[presentation]<S-Space>navigateprevious201map[presentation]<BackSpace>navigateprevious202map[presentation]<F5>toggle_presentation203map[presentation]qtoggle_presentation204map[presentation]<C-h>navigateprevious205map[presentation]<M-v>navigateprevious206map[presentation]<C-v>navigatenext207map[presentation]<A-\<>gototop208map[presentation]<A-\>>gotobottom
3 Настройки
3.1 Установка как приложения по умолчанию
Приложение по умолчанию устанавливается с помощью xdg-utils (см. XDG. Приложения MIME):
1# -*- mode: conf-unix -*- 2## Zathura configuration file 3## See man `man zathurarc' 4 5## Open document in fit-width mode by default 6setadjust-open"best-fit" 7 8## One page per row by default 9setpages-per-row11011## Stop at page boundries12setscroll-page-aware"true"13setsmooth-scroll"true"14setscroll-full-overlap0.0115setscroll-step1001617## Zoom settings18setzoom-min1019setzoom-step320setguioptions""2122# keep several lines of text when23# scrolling a screenful24setscroll-full-overlap0.22526# see documentation for details27setscroll-page-awaretrue28setwindow-title-basenametrue29setadjust-openwidth30setstatusbar-home-tildetrue31setvertical-centertrue32setsynctextrue33# large bold font easier on the eyes in index mode34# status bar can be disabled with A-s35setfont"Iosevka 12"3637setrender-loading"false"38setscroll-step5039unmapf40mapftoggle_fullscreen41map[fullscreen]ftoggle_fullscreen
Распечатка 1:
~/.config/zathura/zathurarc
4.1 Буфер обмена
Выделение мышью копируется в буфер обмена, а не в x11 primary selection.
1## Enable copy to clipboard when selecting text with mouse
2set selection-clipboard clipboard
Таблица 6:
Комбинация клавиш Zathura в основном режиме
Комбинации vi
Комбинации emacs
Значение комбинаций
J, K
перейти на следующую, предыдущую страницу
h, k, j, l
прокрутка влево, вверх, вниз, вправо
←, ↑, ↓, →
прокрутка влево, вверх, вниз, вправо
Ctrl+t, Ctrl+y,
прокрутка влево, вправо на полстраницы
Ctrl+u, Ctrl+d
прокрутка вверх, вниз на полстраницы
Ctrl+f, Ctrl+b
прокрутка вверх, вниз на страницу
gg, G, nG, ngg
A-<, A->
в начало, в конец, на n-ую страницу документа
a, s
вместить страницу по высоте, по ширине
d
просмотр разворота
/, ?
поиск по тексту
Shift+/
обратный поиск по тексту
n, N
перейти к следующему, предыдущему результату поиска
o, O
открыть документ
f
перейти по ссылке
F
показать адрес ссылки
r, nr
поворот по часовой стрелке, поворот n раз
Ctrl+r
инвертировать цвета (в ЧБ)
R
перезагрузить документ
+, -, =
увеличить, уменьшить, оригинальный размер
q
q
выход
C-P
печать
Стандартные комбинации
Комбинации emacs
1## Emacs-like keybindings 2map[normal]<C-b>scrollleft 3map[normal]<C-n>scrolldown 4map[normal]<C-p>scrollup 5map[normal]<C-f>scrollright 6map[normal]<C-g>abort 7map[insert]<C-g>abort 8map[normal]<C-[>abort 9map[normal]<A-\<>gototop10map[normal]<A-\>>gotobottom11map[normal]aadjust_windowbest-fit12map[normal]sadjust_windowwidth13map[normal]Fdisplay_link14map[normal]<C-c>copy_link15map[normal]ffollow16map[normal]mmark_add17map[normal] \' mark_evaluate18map[normal] \,navigatenext19map[normal] \.navigateprevious20map[normal]<A-Right>navigatenext21map[normal]<A-Left>navigateprevious22map[normal]<PageDown>scrollfull-down23map[normal]<PageUp>scrollfull-up24map[normal]<C-P>print25map[normal]crecolor26map[normal]Rreload27map[normal]vrotaterotate_cw28map[normal]Vrotaterotate_ccw29map[normal]<Left>scrollleft30map[normal]<Up>scrollup31map[normal]<Down>scrolldown32map[normal]<Right>scrollright33map[normal]<A-a>scrollhalf-left34map[normal]<C-V>scrollhalf-down35map[normal]<A-V>scrollhalf-up36map[normal]<A-e>scrollhalf-right37map[normal]<C-a>scrollfull-left38map[normal]<C-v>scrollfull-down39map[normal]<Return>scrollfull-down40map[normal]<A-v>scrollfull-up41map[normal]<C-e>scrollfull-right42map[normal]<Space>scrollfull-down43map[normal]<C-h>scrollfull-up44map[normal]<BackSpace>scrollfull-up45map[normal]<S-Space>scrollfull-up46map[normal]ljumplistbackward47map[normal]rjumplistforward48map[normal]<A-r>bisectforward49map[normal]<A-l>bisectbackward50# still need to use '/' to trigger search51map[normal]<C-s>searchforward52map[normal]<C-r>searchbackward53map[normal]psnap_to_page54map[normal]<C-i>toggle_index55map[normal]itoggle_index56map[normal]<Tab>toggle_index57map[normal]<A-s>toggle_statusbar58map[normal]<A-i>focus_inputbar59map[normal]dtoggle_page_mode60map[normal]qquit61map[normal]+zoomin62map[normal]-zoomout63map[normal]=zoomin64map[normal]<A-P>toggle_presentation65map[normal]<A-F>toggle_fullscreen66map[normal]jtoggle_fullscreen