Commit c3a7f2fa authored by Sebastian Ramacher's avatar Sebastian Ramacher

Imported Upstream version 0.0.8.4

parent 39ecf6b5
Copyright (c) 2009 ML, JY - pwmt.org
Copyright (c) 2011 pwmt.org
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
......
......@@ -64,6 +64,7 @@ gdb: debug
dist: clean
@mkdir -p ${PROJECT}-${VERSION}
@cp -R LICENSE Makefile config.mk config.def.h README \
${PROJECT}.desktop ${PROJECT}rc.5.rst \
${PROJECT}.1 ${SOURCE} ${PROJECT}-${VERSION}
@tar -cf ${PROJECT}-${VERSION}.tar ${PROJECT}-${VERSION}
@gzip ${PROJECT}-${VERSION}.tar
......@@ -77,10 +78,20 @@ install: all
@echo installing manual page
@mkdir -p ${DESTDIR}${MANPREFIX}/man1
@sed "s/VERSION/${VERSION}/g" < ${PROJECT}.1 > ${DESTDIR}${MANPREFIX}/man1/${PROJECT}.1
@if which rst2man > /dev/null ; then \
mkdir -p ${DESTDIR}${MANPREFIX}/man5 ; \
rst2man ${PROJECT}rc.5.rst > ${DESTDIR}${MANPREFIX}/man5/${PROJECT}rc.5 ; \
fi
@chmod 644 ${DESTDIR}${MANPREFIX}/man1/${PROJECT}.1
@mkdir -p ${DESTDIR}${DESKTOPPREFIX}
@echo installing desktop file
@install -m 644 ${PROJECT}.desktop ${DESTDIR}${DESKTOPPREFIX}
uninstall:
@echo removing executable file
@rm -f ${DESTDIR}${PREFIX}/bin/${PROJECT}
@echo removing manual page
@rm -f ${DESTDIR}${MANPREFIX}/man1/${PROJECT}.1
@rm -f ${DESTDIR}${MANPREFIX}/man5/${PROJECT}rc.5
@echo removing desktop file
@rm -f ${DESTDIR}${DESKTOPPREFIX}/${PROJECT}.desktop
......@@ -4,10 +4,16 @@ zathura is a pdf viewer based on the poppler pdf rendering library
Requirements
------------
poppler-glib (0.12.3)
cairo (1.8.8)
gtk2 (2.18.6)
glib2 (2.22.4)
poppler-glib (>= 0.12.3)
cairo (>= 1.8.8)
gtk2 (>= 2.18.6)
glib2 (>= 2.22.4)
Please note that you need to have a working pkg-config installation
and that the Makefile is only compatible with GNU make.
And also note that rst2man from python-docutils is needed to build
zathurarc.5. If it is not installed, zathurarc.5 won't be built.
Configuration
-------------
......
......@@ -27,9 +27,23 @@ static const char CONFIG_DIR[] = "~/.config/zathura";
static const char DATA_DIR[] = "~/.local/share/zathura";
/* bookmarks */
static const char BM_PAGE_ENTRY[] = "page";
static const char BM_PAGE_OFFSET[] = "offset";
enum
{
BM_PAGE_ENTRY = 0,
BM_PAGE_OFFSET,
BM_PAGE_SCALE,
BM_MAX,
};
static const char *bm_reserved_names[] =
{
[BM_PAGE_ENTRY] = "page",
[BM_PAGE_OFFSET] = "offset",
[BM_PAGE_SCALE] = "scale",
};
int save_position = 1;
int save_zoom_level = 1;
/* look */
char* font = "monospace normal 9";
......@@ -187,7 +201,7 @@ Command commands[] = {
{"bmark", "b", cmd_bookmark, 0, "Bookmark current page" },
{"close", "c", cmd_close, 0, "Close current file" },
{"coffset", 0, cmd_correct_offset, 0, "Correct page offset" },
{"delbmark", 0, cmd_delete_bookmark, cc_bookmark, "Bookmark current page" },
{"delbmark", 0, cmd_delete_bookmark, cc_bookmark, "Delete bookmark" },
{"export", "e", cmd_export, cc_export, "Export images or attached files" },
{"info", "i", cmd_info, 0, "Show information about the document" },
{"map", "m", cmd_map, 0, "Map keybinding to a function" },
......@@ -197,6 +211,7 @@ Command commands[] = {
{"rotate", "r", cmd_rotate, 0, "Rotate the page" },
{"set", "s", cmd_set, cc_set, "Set an option" },
{"write", "w", cmd_save, 0, "Save the document" },
{"write!", "w!", cmd_savef, 0, "Save the document (and force overwriting)" },
};
/* buffer commands */
......@@ -250,6 +265,7 @@ Setting settings[] = {
{"recolor_darkcolor", &(recolor_darkcolor), 's', FALSE, TRUE, "Recoloring (dark color)"},
{"recolor_lightcolor", &(recolor_lightcolor), 's', FALSE, TRUE, "Recoloring (light color)"},
{"save_position", &(save_position), 'b', FALSE, FALSE, "Save position in file on quit and restore it on open"},
{"save_zoom_level", &(save_zoom_level), 'b', FALSE, FALSE, "Save zoom level on quit and restore it on open"},
{"scroll_step", &(scroll_step), 'f', FALSE, FALSE, "Scroll step"},
{"scroll_wrap", &(scroll_wrap), 'b', FALSE, FALSE, "Wrap scolling at last page"},
{"scrollbars", &(show_scrollbars), 'b', FALSE, TRUE, "Show scrollbars"},
......@@ -311,6 +327,7 @@ ArgumentName argument_names[] = {
{"insert", INSERT},
{"left", LEFT},
{"next", NEXT},
{"noadjust", ADJUST_NONE},
{"original", ZOOM_ORIGINAL},
{"out", ZOOM_OUT},
{"previous", PREVIOUS},
......
# See LICENSE file for license and copyright information
# zathura make config
VERSION = 0.0.8.3
VERSION = 0.0.8.4
# paths
PREFIX ?= /usr
MANPREFIX ?= ${PREFIX}/share/man
DESKTOPPREFIX ?= ${PREFIX}/share/applications
# libs
GTK_INC = $(shell pkg-config --cflags gtk+-2.0 poppler-glib)
......
......@@ -242,5 +242,7 @@ change and adjust all the settings of zathura according to your wishes.
In addition you can create a zathurarc file (default path: ~/.config/zathura/zathurarc)
to overwrite settings and keybindings by using the set and map function. For
more information please check the faq on the website:
http://pwmt.org/projects/zathura
more information please have a look at \&\fIzathurarc\fR\|(5).
.SH SEE ALSO
\&\fIzathurarc\fR\|(5)
This diff is collapsed.
[Desktop Entry]
Version=1.0
Type=Application
Name=Zathura
Comment=A minimalistic PDF viewer
Comment[de]=Ein minimalistischer PDF-Betrachter
Exec=zathura %f
Terminal=false
Categories=Office;Viewer;
MimeType=application/pdf;
===========
zathurarc
===========
--------------------------
zathura configuration file
--------------------------
:Author: Sebastian Ramacher <s.ramacher@gmx.at>
:Date: 19.8.2010
:Manual section: 5
SYNOPOSIS
=========
/etc/zathurarc, ~/.config/zathura/zathurarc
DESCRIPTION
===========
The zathurarc contains various options controlling the behavior of zathura. One
can use the ``set`` and ``map`` commands:
* ``set`` [id] [value]
* ``map`` [key] [function] [argument] [mode]
They behave the same as the ``set`` and ``map`` commands in zathura. Any line
not starting with ``set`` or ``map`` will be ignored.
set
---
[id] and the corresponding [value] can be one of
* adjust_open [bestfit|width|noadjust] - adjust mode.
- bestfit: adjust to best fit
- width: adjust to width
- noadjust: don't adjust
* browser,
uri_command [string] - command to open external URIs.
The string has to include a ``%s`` which will be replaced with the URI.
* completion_bgcolor,
completion_fgcolor,
completion_g_bgcolor,
completion_g_fgcolor,
completion_hl_bgcolor,
completion_hl_fgcolor,
default_bgcolor,
default_fgcolor,
inputbar_bgcolor,
inputbar_fgcolor,
notification_e_bgcolor,
notification_e_fgcolor,
notification_w_bgcolor,
notification_w_fgcolor,
recolor_darkcolor,
recoler_lightcolor,
statusbar_bgcolor,
statusbar_fgcolor,
search_highlight,
select_text [color] -
colors settings.
The color can be given as hex triplet (#rrggbb) or any color
string understood by GTK+ (e.g. red, green, blue, black, ...).
* default_text [string] - text displayed in the statusbar if no file is opened.
* font [string] - the used font.
* height,
width [int] - default height and width of the zathura window.
* labels [bool] - allow label mode.
* list_printer_command [string] - command to list all available printers.
* n_completion_items [int] - number of completion items to display.
* offset - page offset.
* print_command [string] - command to print the file.
The string has to include
``%s`` four times. The first occurence of ``%s`` will be replaced with the
printer, the second with additional options given on the command line, the
third with the pages to print and the fourth with the filename.
* recolor [bool] - invert the image.
* save_position, save_zoom_level [bool] - save current page and zoom level in
bookmarks file.
* scroll_step [float] - scroll step.
* scroll_wrap [bool] - wrap scrolling at the end and beginning of the document.
* scrollbars,
show_statusbar,
show_inputbar [bool] -
show statusbar, inputbar and scrollbars.
* smooth_scolling [float] - smooth scrolling.
* transparency [float] - transparency of rectangles.
* zoom_max,
zoom_min,
zoom_step [float] - maximal and minimal zoom level and zoom step.
map
---
[key] can be a single character, ``<C-?>`` for ``Ctrl + ?`` like shortcuts,
where ``?`` stands for some key (e.g. ``<C-q>``). Also it can be ``<S-?>`` for
uppercase shortcuts or one of
``<BackSpace>, <CapsLock>, <Down>, <Esc>, <F[1-12]>, <Left>, <PageDown>,
<PageUp>, <Return>, <Right>, <Space>, <Super>, <Tab>, <Up>``.
[function] and the corresponding [argument] can be one of
* abort - clear command line and buffer.
* adjust_window
* change_buffer [delete_last]: change buffer.
- delete_last: delete last character
* change_mode [mode] - change mode.
For the possible modes see the list of modes below.
* focus_inputbar - focus the inputbar.
* follow - follow a URI.
* navigate [next|previous|left|right] - navigate the document.
* navigate_index [up|down|expand|collapse|select] - nagivate the index.
* quit - quit zathura.
* recolor - toogle recolor setting.
* reload - reload the file.
* rotate - rotate by 90 degrees clockwise.
* scroll [up|down|half_up|half_down|full_up|full_down|left|right] - scroll.
* search [string] - search for the specified string.
* switch_goto_mode - toogle goto mode.
* toggle_fullscreen - toogle fullscreen mode.
* toggle_index - toogle index mode.
* toggle_inputbar - toogle inputbar display setting.
* toogle_statusbar - toogle statusbar display setting.
* zoom [in|out|float] - zoom in, out or to a specific zooming level.
[mode] can be one of
* all
* fullscreen
* index
* normal
* insert
* visual
If [mode] is omitted, all will be used.
EXAMPLE
=======
::
# zathurarc
# colors
set statusbar_bgcolor #00FF00
set statusbar_fgcolor red
# settings
set height 1024
set width 768
set adjust_open width
# key bindings
map <PageUp> navigate previous
map <PageDown> navigate next
map + zoom in
map - zoom out
map <C-q> quit
SEE ALSO
========
zathura(1)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment