katarakt - a simple PDF viewer with three layouts
katarakt ([OPTIONS] FILE|(-u
It’s a PDF viewer. It views PDFs.
There are currently three layouts. The single layout is
very simple and only supports scrolling on a per page basis. As the name
suggests the current page is displayed in the center and zoomed to fit the
window. It is active by default.
The grid layout is much more advanced and offers continuous
(smooth, per pixel) scrolling, zooming and adjusting the column count. Pages
keep their correct relative size and are shown in a grid.
The presenter layout is for giving a presentation. It opens
a second window, to be viewed on the projector, and shows the current and
next slide in the main window.
For every file passed on the command line a separate process is
Instead of opening a local document, download it from the
-p, --page NUM
Start on page NUM.
Start in fullscreen mode.
-q, --quit true|false
If true, quit on initialization failure. If false, show
the window even if an error occured. Overrides the config option
-s, --single-instance true|false
If true, prevents opening the same document twice and
focuses the existing instance. Overrides the config option
Write the built-in default configuration to FILE
and exit. Hint: on unix systems, you can use --write-defaults
/dev/stdout to print the defaults.
Print version information and exit.
Print help and exit.
Variables and key bindings can be changed by modifying the
katarakt.ini file. By default it is read from $XDG_CONFIG_HOME.
Variables must be listed under the section "[Settings]",
keys under section "[Keys]". Settings that are not present in the
config file use the built-in default. For a list of all variables with a
short explanation see below.
Switch to single layout. Views a single page at a
time, scaled to fit the screen.
Switch to grid layout. Views pages in a continuous
fashion, scaled to fit the window width. Supports zooming and multiple
Switch to presenter layout. Views the current page
and a smaller preview of the next page. Also, opens a second window that shows
only the current page for displaying on a projector.
Up, Down, Left, Right, k,
j, h, l
Move around (up/down/left/right).
Scroll up/down half the screen.
BackSpace, Space, ^b, ^f
Scroll up/down the screen. By default scrolls 90% to
create an overlapping region.
Scroll up/down one page. Kind of swaps the pages in
Home, End, g, G
Go to the first/last page.
Show goto page bar.
Show the search bar. Hitting Esc will hide the
results, searching for an empty string will clear them. If the search term
contains an uppercase letter the search is case sensitive
("smartcase"). If you search for the same term twice the next hit
starting from the current view is selected.
Show the search bar. This next search will be
Focus next/previous search hit. This does not take the
current view into account. For finding the next hit around the current view
search for the same term again.
Focus next/previous search hit that is currently not
^o, ^i, Alt-Left, Alt-Right
Move backward/forward through the jump list. Entries are
added automatically when jumping.
Manually add the current page to the jump list.
-, +, =
Adjust zoom level (grid layout only).
Reset zoom level to default, i.e. fit width (grid
Adjust column count (grid layout only).
Adjust the column the first page will be displayed in.
Useful for reading in a book layout with a cover page (grid layout
Rotate pages left/right.
Toggle the page number display in the bottom right
Toggle between normal and inverted color rendering.
Copy the current selection to the global clipboard.
Swap the mouse buttons for selection and panning. The the
left mouse button’s current operation is indicated by the mouse
Reload the document. This can also be achieved by sending
SIGUSR1 to the process. katarakt reloads automatically if the opened
file has changed.
Open a different document; shows a file dialog.
Show a file dialog to save the current document.
Toggle the table of contents.
Toggle freezing the slide currently displayed in the
projector window. When frozen, scrolling only affects the main window.
single: The layout on startup. Possible values:
single, grid, presenter.
0xDF202020: Background color in ARGB Format. Alpha only
works when using a compositor.
0xFF000000: Fullscreen background color in ARGB
0x40FFFFFF: Color that gets drawn instead of a page that
hasn’t been rendered yet. If colors are inverted, this gets inverted as
1: The mouse button used for clicking links. Buttons 1-5
2: The mouse button used for scrolling the view.
Double-clicking this button centers the view around the location of the click.
This is especially useful when using many columns to get an overview. Resets
the column count to 1.
1: The mouse button used for text selection. Double- and
triple-clicking are supported to select with word/line granularity.
2000: The delay in milliseconds after which the mouse
cursor is hidden. Set to 0 to disable.
30: Pixel offset when moving around.
0.9: Factor for scrolling the screen. Should be <= 1
to create an overlapping region.
0.2: Distance from the border of the screen to keep for
jump targets, e.g. search hits. Moves the view so that search hits are
2: Number of pixels search rects are expanded by.
2: Gap between two pages in grid layout in
-14: Smallest zoom value.
30: Biggest zoom value.
0.05: Influences the number of steps between min and
50: Pages can not be smaller than this.
false: If true, quit katarakt if the document fails to
false: If set and katarakt is called with a file that is
already shown in another katarakt instance, then the other katarakt window is
It can be
overridden via Qt’s -stylesheet
command line option. The
following example changes the goto page
border-top: 1px solid black;
border-right: 1px solid black;
Page %1/%2: The text in the bottom right corner.
The name of your icon theme. Fill in if auto detection
4: Number of pages exceeding the currently visible ones
to render, back- and forwards respectively.
0.5: the contrast when using inverted colors to avoid too
0.15: amount of brightening when using inverted colors to
shift black to gray.
120: QT delta for turning the mouse wheel 1 click.
Shouldn’t need to be touched.
true: Enables the higher quality downsampling filter for
32: One dimension of square thumbnails saved at run-time
for every page that was once rendered.
Feel free to join the IRC channel #katarakt on
katarakt is written by Philipp Erhardt.