QMAN(1)
πΈ QMAN(1) π
Bestie, welcome to the qman page from the General Commands Manual β sheβs giving modern manual viewer, and weβre obsessed. π«Ά
β¨ NAME β¨
Qman β A more modern manual page viewer for our terminals π
π¦ SYNOPSIS π¦
qman [options]
qman [options] -n
qman [options] [[section] page]
qman [options] -k regexp ...
qman [options] -f page ...
π DESCRIPTION π
Qman is a modern, interactive manual page viewer for our terminals. She <highkey>strives</highkey> to be easy to use for anyone familiar with the man(1) command, and also to be fast and tiny, so that she can be used everywhere. β¨
π EXAMPLES π
qmanorqman -nβ Show the index (home) page, a collection of all manual pages available on the system.qman lsβ Show the manual page forls.qman 1 lsorqman `ls(1)'β Show the manual page forlsfrom manual section1.qman -f openβ Show all manual pages namedopenacross all sections (whatis).qman -k openβ Show all manual pages whose short description matches the termopen(apropos).
π USER INTERFACE π
Qmanβs reactions to user input are similar to what one would expect from a pager such as less(1), or from an ncurses-based browser such as links(1). Manual, apropos, and whatis pages are adorned with links to other pages, HTTP locations, e-mail addresses, files in the local filesystem, or (sub)sections within the current page. These links can be selected and opened. π
The program provides a scrollbar, a status line, incremental search facilities for locating manual pages, and facilities for searching through the text of the page currently being displayed. A table of contents is generated for each page, allowing for easy navigation to its sections, sub-sections, and paragraphs. Navigation history and on-line help are also available. π«Ά
The table below summarizes the programβs actions and their default associated keyboard mappings β but make it a glow-up list, because weβre not doing tables today:
UPβ Scroll up one line and/or focus on the previous link. Keys:UP,y,k.DOWNβ Scroll down one line and/or focus on the next link. Keys:DOWN,e,j.LEFTβ Scroll left one tab stop. Keys:LEFT,<.RIGHTβ Scroll right one tab stop. Keys:RIGHT,>.PGUPβ Scroll up one page. Keys:PGUP,b.PGDNβ Scroll down one page. Keys:PGDN,f.HOMEβ Go to page top. Keys:HOME,g.ENDβ Go to page bottom. Keys:END,G.OPENβ Open focused link. Keys:ENTER,o.OPEN_APROPOSβ Perform apropos on focused link. Key:a.OPEN_WHATISβ Perform whatis on focused link. Key:w.SP_OPENβ Open a manual page using a dialog. Key:O.SP_APROPOSβ Perform apropos using a dialog. Key:A.SP_WHATISβ Perform whatis using a dialog. Key:W.INDEXβ Go to index (home) page. Keys:i,I.BACKβ Go back one step in history. Keys:BACKSPACE,[.FWRDβ Go forward one step in history. Key:].HISTORYβ Show history menu. Keys:s,S.TOCβ Show table of contents. Keys:t,T.SEARCHβ Forward search in current page text. Key:/.SEARCH_BACKβ Backward search in current page text. Key:?.SEARCH_NEXTβ Go to next search result. Key:n.SEARCH_PREVβ Go to previous search result. Key:N.HELPβ Show the help dialog. Keys:h,H.QUITβ Exit the program. Keys:q,Q.
All of the aforementioned keyboard mappings are customizable. For more information, see CONFIGURATION. π
π MOUSE SUPPORT π
Mouse input is supported but is considered experimental and is disabled by default. The CONFIGURATION section contains instructions on how to enable it. Many terminal emulators still provide basic mouse support when mouse input is disabled. π
When mouse input is enabled:
- The scroll wheel can be used as an alternative way for scrolling, invoking the
UPandDOWNprogram actions. - Pressing and dragging the left mouse button over page text causes it to be selected and copied to the clipboard (see NOTES 1 & 2).
- Pressing and dragging the left mouse button over the scrollbar allows for scrolling through the page (see NOTE 2).
- Clicking the left mouse button on a link causes the link under the cursor to be selected (see NOTE 2).
- Clicking the middle button (the scroll wheel for most mice) invokes the
OPENaction, opening the currently selected link. - Clicking the right button invokes the
HELPaction. - When inputting a search query or selecting from a menu, the middle button acts as a substitute for the
ENTERkey, and the right button as a substitute forCTRL-C. - When selecting from a menu, clicking the left button causes the menu entry under the cursor to be selected.
The above behavior can be customized. For more information, see CONFIGURATION. β¨
NOTE 1 There is no reliable method for terminal clients to copy data to the clipboard. An escape code (OSC 52) does exist but is supported reliably only bykitty(1)andghostty(1). For all other terminals, Qman will default to using commands such asxclip(1),wl-clipboard(1), orpbcopy(1). However, these will only work when running locally and within a desktop environment (not when using SSH).
NOTE 2 Some terminals may report mouse cursor position inaccurately, causing difficulties with clicking and dragging.
π₯ OPTIONS π₯
The program accepts the following non-argument options:
-n,--indexβ Show a list of all manual pages on the system, together with their sections and short descriptions. (This is the default behavior when the program is launched with no command-line options and no arguments.)-k,--aproposregexp ... β Interactive equivalent toapropos(1). Search for manual pages whose names and/or short descriptions match any of the regexp arguments, and display their names, sections, and short descriptions.-f,--whatispage ... β Interactive equivalent towhatis(1). Display the name, section, and short description of each of the manual page argument.-l,--local-filefile ... β Activate βlocalβ mode. Format and display each local manual file, rather than searching through the systemβs manual pages. Each file is interpreted as thenroffsource file of a manual page.-K,--global-aproposregexp ... β Show the contents of all manual pages whose names and/or short descriptions match any of the regexp arguments. Beware that this option might cause long execution times. If not used in conjunction with-T, it is ignored.-a,--allpage ... β Show the contents of all manual pages whose names match any of the page arguments. Beware that this option might cause long execution times. If not used in conjunction with-T, it is ignored.-T,--cliβ Suppress the text user interface and output directly to the terminal. This option can be used to redirect the programβs formatted output to a text file or to another command.-z,--cli-force-colorβ Produce colorful output using terminal escape codes, even when not running inside a terminal. This must be used in conjunction with-Tand otherwise will be ignored.-A,--actionaction_name β Automatically perform program action action_name upon startup. The list of valid action names can be found under USER INTERFACE.-C,--config-pathfile β Use file as the configuration file for Qman.-v,--versionβ Print program version and exit.-h,--helpβ Print a help message and exit.
πΈ CONFIGURATION πΈ
Qman expects to find its configuration file in the standard locations defined by the XDG Base Directory Specification. The following locations are searched in sequence:
- Any file specified using
-Cor--config-path ${XDG_CONFIG_HOME}/qman/qman.conf${HOME}/.config/qman/qman.conf<path>/qman/qman.confwhere<path>is an entry in${XDG_CONFIG_DIRS}<configdir>/qman.confwhere<configdir>is a compile-time option/etc/xdg/qman/qman.conf/etc/qman/qman.conf
The process stops once a configuration file has been found. π
Qmanβs configuration file uses the basic INI file format, extended with an include directive to allow for the configuration to be spread across multiple files.
Different configuration options are grouped into sections. The paragraphs below summarize the sections and configuration options that are available:
Section [chars]
Options in this section specify what characters will be used to draw the text user interface:
sbar_topβ scrollbar top endsbar_vlineβ scrollbar track linesbar_bottomβ scrollbar bottom endsbar_blockβ scrollbar knobtrans_mode_nameβ transition between the mode and name sections of the status bartrans_name_locβ transition between the name and location sections of the status bartrans_prompt_helpβ transition between the prompt and help sections of the status bartrans_prompt_emβ transition between the prompt and error message sections of the status barbox_hlineβ dialog box horizontal linebox_vlineβ dialog box vertical linebox_tlβ dialog box top left cornerbox_trβ dialog box top right cornerbox_blβ dialog box bottom left cornerbox_brβ dialog box bottom right cornerarrow_upβ up arrowarrow_downβ down arrowarrow_lrβ left/right arrow / equivalence sign
Each configuration option value must consist of a single Unicode character. π§
Okay so real talk: the default values for this section were hand-picked so Qman behaves correctly on basically every terminal ever, including the venerable xterm(1) and the Linux console, and with all fonts. π Depending on what your terminal can do, Qman may decide to revert to those defaults and straight-up ignore any options you specified in this section. No cap. You can override that by adding unicode=true to the [tcap] section. β¨
π¨ Section [colours] π¨
These options set the user interface colors. Pick a color, any color π
textβ page textsearchβ matched search terms in page textlink_manβ links to manual pageslink_man_fβ links to manual pages (focused)link_httpβ HTTP linkslink_http_fβ HTTP links (focused)link_emailβ e-mail linkslink_email_fβ e-mail links (focused)link_fileβ links to files in the local filesystemlink_file_fβ links to files in the local filesystem (focused)link_lsβ in-page linkslink_ls_fβ in-page links (focused)sb_lineβ scrollbar track linesb_blockβ scrollbar knobstat_indic_modeβ status bar mode sectionstat_indic_nameβ status bar name sectionstat_indic_locβ status bar location sectionstat_input_promptβ status bar input promptstat_input_helpβ status bar help sectionstat_input_emβ status bar error message sectionimm_borderβ pop-up dialogs borderimm_titleβ pop-up dialogs titlesp_inputβ input dialog promptsp_textβ input dialog incremental search textsp_text_fβ input dialog incremental search text (focused)help_textβ help dialog entries texthelp_text_fβ help dialog entries text (focused)history_textβ history dialog entries texthistory_text_fβ history dialog entries text (focused)toc_textβ table of contents dialog entries texttoc_text_fβ table of contents dialog entries text (focused)
Each color is defined using three words separated by whitespace:
foreground background bold
foreground and background can be one of black, red, green, yellow, blue, magenta, cyan, or white. Alternatively, they can be a number between 0 and 255, or a hexadecimal RGB value using the #RRGGBB notation.
bold is a boolean that signifies whether the foreground color will have a high (true) or low (false) intensity.
The default values for this section have been chosen to allow Qman to work correctly with virtually all terminals, including the venerable xterm(1) and the Linux console. Depending on the terminalβs capabilities, Qman may choose to revert to said defaults, and ignore any options you have specified in this section. This behavior can be overridden by adding colors=256 and/or rgb=true to the [tcap] section.
β¨οΈ Section [keys] β¨οΈ
These options specify which keys are mapped to each program action. Main character energy for your keyboard π₯
The section contains 25 configuration options, each corresponding to one of the program actions described in the USER INTERFACE section of this manual page. Their value is a tuple of up to 8 key definitions, separated by whitespace:
key_1 key_2 key_3 key_4 key_5 key_6 key_7 key_8
The value of each key_i can take one of the following values:
- Any character, such as
a,b,c, etc. - Any
ncurses(3x)keycode, such asKEY_UPorKEY_HOME F1toF12(for the function keys)ESC(for the ESC key)EXT(for CTRL-C)LF(for the ENTER key)BS(for the BACKSPACE key)HT(for the TAB key)SPACE(for the spacebar)
For reasons of compatibility with various terminals, mapping the ENTER key requires specifying both KEY_ENTER and LF. Similarly, mapping CTRL-C requires specifying both KEY_BREAK and ETX, and mapping BACKSPACE requires specifying both KEY_BACKSPACE and BS.
π±οΈ Section [mouse] π±οΈ
This section contains the following options that pertain to mouse support:
enable(boolean, defaultfalse) β Enables mouse supportleft_handed(boolean, defaultfalse) β Swaps the left and right mouse buttonsleft_click_open(boolean, defaultfalse) β Causes the left mouse button to invoke the OPEN action and/or act as the ENTER key
πͺ Section [layout] πͺ
This section contains various options that concern the layout of the text user interface:
sbar(boolean, defaulttrue) β Indicates whether the scrollbar will be displayedbeep(boolean, defaulttrue) β Indicates whether to beep the terminal on errorlmargin(unsigned int, default2) β Size of margin between the left side of the screen, and the page textrmargin(unsigned int, default2) β Size of margin between the page text and the scroll bar and/or the right side of the screentabstop(unsigned int, default8) β Number of characters in a tab stop (used by actionsLEFTandRIGHT)
π°οΈ Section [tcap] π°οΈ
Normally, Qman detects the terminalβs capabilities automatically. Options in this section provide the ability to specify them explicitly, overriding this behavior:
colours(int, default-1) β Number of colors supported by the terminal, or-1to auto-detectrgb(ternary, defaultauto) β True if terminal can re-define colors, false if not, auto to auto-detectunicode(ternary, defaultauto) β True if terminal supports Unicode, false if not, auto to auto-detectclipboard(ternary, defaultauto) β True if terminal supports clipboard operations (OSC 52), false if not, auto to auto-detectescdelay(int, default60) β Number of milliseconds to wait after receiving ESC from the keyboard before interpreting it as the escape key. Users with historical terminals or very unreliable network connections may want to increase this.
Beware that Qman uses these capabilities to decide whether to either honor or ignore various configuration options specified elsewhere, particularly in the[chars]and[colours]sections mentioned above. Auto-detection should work correctly in most cases; itβs therefore recommended to not modify any of the options in this section, except when discovering or reporting bugs. π
π§° Section [capabilities] π§°
This section allows the user to disable various non-essential features of Qman:
sections_on_top(boolean, defaulttrue) β Show a list of (links to the pageβs) sections at the top of each pagehttp_links(boolean, defaulttrue) β Generate hyperlinks to HTTP URLsemail_links(boolean, defaulttrue) β Generate hyperlinks to email addressesfile_links(boolean, defaulttrue) β Generate hyperlinks to local files and directorieshyphenate(boolean, defaulttrue) β Hyphenate long words in manual pagesjustify(boolean, defaulttrue) β Justify text in manual pagesicase_search(boolean, defaulttrue) β Ignore case when performing page text searchsp_substrings(boolean, defaulttrue) β Include substring matches when performing incremental search of manual pages
All features are enabled by default.
On slow machines, performance can be improved by disabling some features. Also, disabling hyphenate and/or justify can improve legibility in narrow terminal windows.
π§ Section [misc] π§
This section contains various miscellaneous options:
system_typeβstring, defaultmandbβ the manual system typeman_pathβstring, default/usr/bin/manβ path to theman(1)commandgroff_pathβstring, default/usr/bin/groffβ path to thegroff(1)commandwhatis_pathβstring, default/usr/bin/whatisβ path to thewhatis(1)commandapropos_pathβstring, default/usr/bin/aproposβ path to theapropos(1)commandbrowser_pathβstring, default/usr/bin/xdg-openβ path to the command used to open HTTP links (i.e. your web browser)mailer_pathβstring, default/usr/bin/xdg-emailβ path to the command used to open e-mail links (i.e. your e-mail software)viewer_pathβstring, default/usr/bin/xdg-openβ path to the command used to open links to files in the local filesystemreset_after_httpβboolean, defaulttrueβ re-initialize curses after opening an http(s) linkreset_after_emailβboolean, defaulttrueβ re-initialize curses after opening an e-mail linkreset_after_viewerβboolean, defaulttrueβ re-initialize curses after opening a link to a local filesystem fileterminfo_resetβboolean, defaultfalseβ reset the terminal using the strings provided byterminfo(5)on shutdownhistory_sizeβunsigned int, default256kβ maximum number of history entries
system_type has to match the Unix manual system your O/S is actually running, bestie. No vibes-based guessing π
mandbβ most Linux distributionsmandocβ Void Linux, Haiku, others?freebsdβ FreeBSDdarwinβ macOS
To dodge that annoying screen redraw π, you can set reset_after_http, reset_after_email, or reset_after_viewer to false whenever browser_path, mailer_path, or viewer_path respectively point to a GUI program. GUI = no terminal to restore, so the reset is just extra drama π
Setting terminfo_reset to true kicks off a full terminal reset on program shutdown, using the strings provided by terminfo(5). Why would you want this? Because if your ncurses implementation doesn't completely restore terminal settings (e.g. colors) on exit, this is the fix. But β side effect alert π¨ β it also clears the screen and erases your scroll history. So like, pick your fighter.
When you're on a horizontally narrow terminal, setting hyphenate to true and/or justify to false can genuinely improve the program's output. Narrow terminal + full justification = chaos, ngl πΈ
Setting sp_substrings to false makes incremental search results only include pages whose names start with the user's input. Setting it to true (which is the default, ikyk) also includes pages whose names contain the input as a substring β provided there's enough space left in the window. Space said no? Then it's a no π«Ά
π Include directive
You can pull in supplemental config files, like so:
include path
Where path is either an absolute path to the supplemental file, or a path relative to the directory component of the configuration file that's doing the including. So yes, relative paths are relative to the includer, not to you, not to your shell, not to your heart π
π¦ Notes on syntax
Include paths and option values may optionally be placed inside single or double quotes. They can also contain these escape sequences:
\a,\b,\t,\n,\v,\f, and\rβ interpreted according to the ASCII standard\eβ interpreted as an escape (0x1b) character\\β interpreted as a backslash\'and\"β interpreted as a single and a double quote respectively
All text following a ; until the end of the line counts as a comment and gets yeeted. Discarded. Gone. Periodt ποΈβ¨
π ENVIRONMENT π
Bestie, take care setting your TERM environment variable so it actually matches your virtual terminal. Mismatch = regrets π
When the program is invoked using -T, it tries to set its page width to the value of the MANWIDTH environment variable. If MANWIDTH hasn't been set, it tries to set the page width to the value of COLUMNS. And if that fails too, it tries to auto-detect the terminal's size using an ioctl(2) β and if that also fails? It just sets it to the default value of 80. Iconic fallback behaviour honestly π
π SIGNALS π
Upon receiving SIGUSR1, the program interrupts its operation and attempts to re-parse its configuration file, using the process outlined in CONFIGURATION. Fresh config, no relaunch π₯
This feature is handy for people who want to automatically switch themes depending on the time of day β day mode, night mode, main character energy ππ
Heads up though: it's noted as experimental, and it has issues with certain terminals. So cute in theory, slightly cursed in practice π
β EXIT STATUS β
0β successful program execution π1β usage or syntax error2β operational error3β a child process returned a non-zero exit status4β configuration file error16β no manual page(s) found matching the user's request π
The above are similar to the exit values of man(1). Same family, same energy π
π«Ά SEE ALSO π«Ά
man(1), apropos(1), whatis(1), pinfo(1)
π AUTHOR π
Written by Pantelis Panayiotou / plp13 on GitHub π
π BUGS π
Please report bugs at https://github.com/plp13/qman/issues β the maintainer wants to hear from you, fr fr ππ
And that's the whole page, bestie!! You made it to the very end, I'm so proud π₯Ήπ This was Qman 1.5.1, dated December 15, 2023 β that's the source/version and date right there, so you never have to wonder which build you're reading about. Now go read some manual pages, slay, and remember: the man page is your friend πΈβ¨π¦
π¦ where this page comes from
- alpine 3.24: qman-doc 1.5.1-r1 Β· BSD-2-Clause
- nixpkgs unstable: qman 1.5.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms