How to use the command 'zathura' (with examples)

How to use the command 'zathura' (with examples)

Zathura is a vim-like modal document viewer that comes with an integrated command-line interface. It requires a backend such as poppler, PostScript, or DjVu to be installed on the system. Zathura provides various functionalities to view, navigate, and manipulate documents in different formats. This article will illustrate each of these use cases with examples.

Use case 1: Open a file

Code:

zathura path/to/file

Motivation: This command is used to open a document file in Zathura for viewing and navigation.

Explanation: path/to/file is the path to the document file that you want to open with Zathura. Replace it with the actual path of your file.

Example output: The document specified by path/to/file will be displayed in the Zathura window, allowing you to view and interact with it.

Use case 2: Navigate left/up/down/right

Code:

<H|J|K|L> or arrow keys

Motivation: This command is used to navigate within the opened document in Zathura.

Explanation: Use the <H|J|K|L> keys or the arrow keys to move the viewport to the left, down, up, or right respectively.

Example output: The view of the document will be shifted in the corresponding direction as you press the navigation keys.

Use case 3: Rotate

Code:

r

Motivation: This command is used to rotate the view of the document in Zathura.

Explanation: Press the r key to rotate the view of the document clockwise by 90 degrees.

Example output: The view of the document will be rotated by 90 degrees in the clockwise direction.

Use case 4: Invert Colors

Code:

Ctrl + R

Motivation: This command is used to invert the colors of the document in Zathura.

Explanation: Press the Ctrl + R keys simultaneously to invert the colors of the document.

Example output: The colors of the document will be inverted, providing a different visual representation of the content.

Use case 5: Search for text by a given string

Code:

/string

Motivation: This command is used to search for a specific string within the document in Zathura.

Explanation: Type / followed by the string you want to search for within the document and press Enter. Zathura will highlight the matching instances of the string in the document.

Example output: The instances of the specified string within the document will be highlighted for easy identification.

Use case 6: Create/delete bookmarks

Code:

:bmark|bdelete bookmark_name

Motivation: This command is used to create or delete bookmarks within the document in Zathura.

Explanation: To create a new bookmark, type :bmark bookmark_name and press Enter. Replace bookmark_name with the desired name for the bookmark. To delete an existing bookmark, type :bdelete bookmark_name and press Enter.

Example output: If a new bookmark is created, it will be added to the list of bookmarks for easy navigation. If an existing bookmark is deleted, it will be removed from the list.

Use case 7: List Bookmarks

Code:

:blist

Motivation: This command is used to list all the bookmarks created within the document in Zathura.

Explanation: Type :blist and press Enter to display a list of all the bookmarks created within the document.

Example output: The list of bookmarks along with their names and corresponding page numbers will be displayed.

Conclusion:

Zathura is a powerful document viewer that provides a range of functionalities for efficient viewing, navigation, and manipulation of documents. It supports different formats and offers a vim-like interface with an integrated command-line for ease of use. By following the examples provided in this article, you can leverage the various features of Zathura to enhance your document viewing experience.

Related Posts

How to use the command 'msiexec' (with examples)

How to use the command 'msiexec' (with examples)

The ‘msiexec’ command is used in Windows operating systems to install, update, repair, or uninstall Windows programs using MSI (Windows Installer) and MSP (Windows Installer Patch) package files.

Read More
How to use the command "pueue pause" (with examples)

How to use the command "pueue pause" (with examples)

The pueue pause command is used to pause running tasks or groups in the Pueue task management system.

Read More
How to use the command "finch" (with examples)

How to use the command "finch" (with examples)

Finch is a console-based modular messaging client that allows users to send and receive messages through various messaging protocols.

Read More