Commit 16c8982a authored by Sebastian Ramacher's avatar Sebastian Ramacher

Imported Upstream version 0.0.8.1

parent a5a5e1fa
......@@ -28,17 +28,25 @@ options:
${OBJECTS}: config.h config.mk
${DOBJECTS}: config.h config.mk
config.h:
@cp config.def.h $@
config.h: config.def.h
@if [ -f $@ ] ; then \
echo "config.h exists, but config.def.h is newer. Please check your" \
"config.h or ${PROJECT} might fail to build." ; \
else \
cp $< $@ ; \
fi
${PROJECT}: ${OBJECTS}
@echo CC -o $@
@${CC} -s ${LDFLAGS} -o $@ ${OBJECTS} ${LIBS}
@${CC} ${SFLAGS} ${LDFLAGS} -o $@ ${OBJECTS} ${LIBS}
clean:
@rm -rf ${PROJECT} ${OBJECTS} ${PROJECT}-${VERSION}.tar.gz \
${DOBJECTS} ${PROJECT}-debug
distclean: clean
@rm -rf config.h
${PROJECT}-debug: ${DOBJECTS}
@echo CC -o ${PROJECT}-debug
@${CC} ${LDFLAGS} -o ${PROJECT}-debug ${DOBJECTS} ${LIBS}
......
/* settings */
int default_width = 800;
int default_height = 600;
float zoom_step = 10;
float zoom_min = 10;
float zoom_max = 400;
float scroll_step = 40;
float transparency = 0.4;
int default_width = 800;
int default_height = 600;
float zoom_step = 10;
float zoom_min = 10;
float zoom_max = 400;
float scroll_step = 40;
float transparency = 0.4;
float smooth_scrolling = 0.0;
int n_completion_items = 15;
/* completion */
static const char FORMAT_COMMAND[] = "<b>%s</b>";
static const char FORMAT_DESCRIPTION[] = "<i>%s</i>";
/* directories and files */
static const char ZATHURA_DIR[] = ".config/zathura";
static const char BOOKMARK_FILE[] = "bookmarks";
static const char ZATHURA_RC[] = "zathurarc";
static const char GLOBAL_RC[] = "/etc/zathurarc";
char* zathura_dir = "~/.config/zathura";
/* bookmarks */
static const char BM_PAGE_ENTRY[] = "page";
......@@ -49,10 +52,10 @@ char* default_text = "[No Name]";
/* printing */
char* list_printer_command = "lpstat -v | sed -n '/^.*device for \\(.*\\): .*$/s//\\1/p'";
char* print_command = "lp -d '%s' -P %s '%s'"; /* printer / pages / file */
char* print_command = "lp -d '%s' -P %s %s %s"; /* printer / pages / file */
/* open uri */
char* uri_command = "firefox '%s'"; /* uri */
char* uri_command = "firefox %s"; /* uri */
/* additional settings */
gboolean show_scrollbars = FALSE;
......@@ -60,6 +63,23 @@ int adjust_open = ADJUST_BESTFIT;
#define SELECTION_STYLE POPPLER_SELECTION_GLYPH
#define GOTO_MODE GOTO_LABELS /* GOTO_DEFAULT, GOTO_LABELS, GOTO_OFFSET */
/* define additional modes */
#define INSERT (1 << 4)
#define VISUAL (1 << 5)
#define EMACS_CX (1 << 6)
/* mode names */
ModeName mode_names[] = {
/* default mode names */
{"all", ALL, ""},
{"fullscreen", FULLSCREEN, ""},
{"index", INDEX, ""},
{"normal", NORMAL, ""},
/* additional mode names */
{"insert", INSERT, "-- INSERT --"},
{"visual", VISUAL, "-- VISUAL --"}
};
/* shortcuts */
Shortcut shortcuts[] = {
/* mask, key, function, mode, argument */
......@@ -82,7 +102,6 @@ Shortcut shortcuts[] = {
{0, GDK_K, sc_navigate, NORMAL, { PREVIOUS } },
{GDK_MOD1_MASK, GDK_Right, sc_navigate, NORMAL, { NEXT } },
{GDK_MOD1_MASK, GDK_Left, sc_navigate, NORMAL, { PREVIOUS } },
{0, GDK_space, sc_navigate, NORMAL, { NEXT } },
{0, GDK_Left, sc_navigate, FULLSCREEN, { PREVIOUS } },
{0, GDK_Up, sc_navigate, FULLSCREEN, { PREVIOUS } },
{0, GDK_Down, sc_navigate, FULLSCREEN, { NEXT } },
......@@ -111,6 +130,7 @@ Shortcut shortcuts[] = {
{GDK_CONTROL_MASK, GDK_u, sc_scroll, NORMAL, { HALF_UP } },
{GDK_CONTROL_MASK, GDK_f, sc_scroll, NORMAL, { FULL_DOWN } },
{GDK_CONTROL_MASK, GDK_b, sc_scroll, NORMAL, { FULL_UP } },
{0, GDK_space, sc_scroll, NORMAL, { FULL_DOWN } },
{0, GDK_O, sc_switch_goto_mode, NORMAL, {0} },
{0, GDK_F5, sc_toggle_fullscreen, NORMAL | FULLSCREEN, {0} },
{0, GDK_Tab, sc_toggle_index, NORMAL | INDEX, {0} },
......@@ -123,13 +143,19 @@ Shortcut shortcuts[] = {
InputbarShortcut inputbar_shortcuts[] = {
/* mask, key, function, argument */
{0, GDK_Escape, isc_abort, {0} },
{GDK_CONTROL_MASK, GDK_c, isc_abort, {0} },
{0, GDK_Up, isc_command_history, {0} },
{0, GDK_Down, isc_command_history, {0} },
{0, GDK_Tab, isc_completion, { NEXT } },
{GDK_CONTROL_MASK, GDK_Tab, isc_completion, { NEXT_GROUP } },
{0, GDK_ISO_Left_Tab, isc_completion, { PREVIOUS } },
{GDK_CONTROL_MASK, GDK_ISO_Left_Tab, isc_completion, { PREVIOUS_GROUP } },
{0, GDK_BackSpace, isc_string_manipulation, { DELETE_LAST_CHAR } },
{GDK_CONTROL_MASK, GDK_h, isc_string_manipulation, { DELETE_LAST_CHAR } },
{GDK_CONTROL_MASK, GDK_u, isc_string_manipulation, { DELETE_TO_LINE_START } },
{GDK_CONTROL_MASK, GDK_w, isc_string_manipulation, { DELETE_LAST_WORD } },
{GDK_CONTROL_MASK, GDK_f, isc_string_manipulation, { NEXT_CHAR } },
{GDK_CONTROL_MASK, GDK_b, isc_string_manipulation, { PREVIOUS_CHAR } },
};
/* mouse settings */
......@@ -200,6 +226,7 @@ Setting settings[] = {
{"inputbar_fgcolor", &(inputbar_fgcolor), 's', FALSE, TRUE, "Inputbar foreground color"},
{"labels", &(Zathura.Global.enable_labelmode), 'b', FALSE, TRUE, "Allow label mode"},
{"list_printer_command", &(list_printer_command), 's', FALSE, FALSE, "Command to list printers"},
{"n_completion_items", &(n_completion_items), 'i', FALSE, FALSE, "Number of completion items"},
{"notification_e_bgcolor", &(notification_e_bgcolor), 's', FALSE, TRUE, "Notification (error) background color"},
{"notification_e_fgcolor", &(notification_e_fgcolor), 's', FALSE, TRUE, "Notification (error) foreground color"},
{"notification_w_bgcolor", &(notification_w_bgcolor), 's', FALSE, TRUE, "Notification (warning) background color"},
......@@ -215,9 +242,11 @@ Setting settings[] = {
{"show_inputbar", &(Zathura.Global.show_inputbar), 'b', FALSE, TRUE, "Show inputbar"},
{"search_highlight", &(search_highlight), 's', FALSE, TRUE, "Highlighted results"},
{"select_text", &(select_text), 's', FALSE, TRUE, "Rectangle of the selected text"},
{"smooth_scrolling", &(smooth_scrolling), 'f', FALSE, TRUE, "Show scrollbars"},
{"statusbar_bgcolor", &(statusbar_bgcolor), 's', FALSE, TRUE, "Statusbar background color"},
{"statusbar_fgcolor", &(statusbar_fgcolor), 's', FALSE, TRUE, "Statusbar foreground color"},
{"transparency", &(transparency), 'f', FALSE, FALSE, "Transparency of rectangles"},
{"uri_command", &(uri_command), 's', FALSE, FALSE, "Command for opening URIs"},
{"width", &(default_width), 'i', FALSE, FALSE, "Default window width"},
{"zoom_max", &(zoom_max), 'f', FALSE, FALSE, "Zoom maximum"},
{"zoom_min", &(zoom_min), 'f', FALSE, FALSE, "Zoom minimum"},
......@@ -277,16 +306,6 @@ ArgumentName argument_names[] = {
{"width", ADJUST_WIDTH},
};
/* mode names */
ModeName mode_names[] = {
{"all", ALL},
{"fullscreen", FULLSCREEN},
{"index", INDEX},
{"insert", INSERT},
{"normal", NORMAL},
{"visual", VISUAL},
};
/* special keys */
GDKKey gdk_keys[] = {
{"<BackSpace>", GDK_BackSpace},
......
# See LICENSE file for license and copyright information
# zathura make config
VERSION = 0.0.7
VERSION = 0.0.8.1
# paths
PREFIX ?= /usr
......@@ -22,3 +22,6 @@ DFLAGS = -g
# compiler
CC ?= gcc
# strip
SFLAGS = -s
......@@ -4,17 +4,19 @@ zathura \- a PDF viewer
.SH SYNOPSIS
.B zathura
.RB [-e\ xid]
.RB [-c\ path]
.RB [file]
.RB [password]
.SH DESCRIPTION
zathura is a highly customizable and functional PDF viewer based on the poppler
rendering library and the gtk+ toolkit. The idea behind zathura is an
application that provides a minimalistic and space saving interface as well as
an easy usage that mainly focuses on keyboard interaction.
rendering library and the gtk+ toolkit. zathura provides a minimalistic and
space saving interface, with a focus on keyboard interaction.
.SH OPTIONS
.TP
.B -e xid
Reparents to window specified by xid.
.B -c path
Path to the config directory
.SH DEFAULT SETTINGS
.SS Shortcuts
.TP
......@@ -162,12 +164,12 @@ Zoom to the given level
Move to the given position
.SS Commands
.TP
.B bmark
Bookmark current page
.TP
.B blist
List and open bookmark
.TP
.B bmark
Bookmark current page
.TP
.B close
Close current file
.TP
......@@ -192,15 +194,15 @@ Open a file
.B print
Print the document
.TP
.B quit
Quit the program
.TP
.B rotate
Rotate the page
.TP
.B set
Set an option (set <id> <value>)
.TP
.B quit
Quit the program
.TP
.B write
Save the document
.SS Inputbar shortcuts
......@@ -221,6 +223,7 @@ The complete configuration including the appearance and shortcuts of the program
are defined in a separate file named config.h. In this file you are able to
change and adjust all the settings of zathura according to your wishes.
In addition you can create a zathurarc file (default path: ~/.zathura/zathurarc)
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/zathura
more information please check the faq on the website:
http://pwmt.org/projects/zathura
This diff is collapsed.
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