From 37356007a0365a26d5a287320591cfe7f8490714 Mon Sep 17 00:00:00 2001 From: Louie Shprung Date: Fri, 17 Feb 2023 14:50:51 -0800 Subject: Improved dist target by properly including all docs and separating man pages --- man/terminal-media-launcher-config.5 | 133 +++++++++++++++++++++++++++++++++++ man/terminal-media-launcher.1 | 81 +++++++++++++++++++++ 2 files changed, 214 insertions(+) create mode 100644 man/terminal-media-launcher-config.5 create mode 100644 man/terminal-media-launcher.1 (limited to 'man') diff --git a/man/terminal-media-launcher-config.5 b/man/terminal-media-launcher-config.5 new file mode 100644 index 0000000..60b814b --- /dev/null +++ b/man/terminal-media-launcher-config.5 @@ -0,0 +1,133 @@ +.TH TERMINAL-MEDIA-LAUNCHER-CONFIG 5 + +.SH NAME +terminal-media-launcher-config - terminal-media-launcher configuration file + +.SH SYNOPSIS +~/.config/terminal-media-launcher/config (or ~/.terminal-media-launcher/config) + +.SH DESCRIPTION +The configuration file for terminal-media-launcher is a plain text file where commands regarding media groups and entries, along with various settings regarding layout, are specified. These commands are described in the next section. Each line is evaluated on its own, while empty lines and lines beginning with # are ignored. + +A configuration file can be automatically generated if no such file is found. An automatically generated configuration file will create groups for Music, Pictures, and Videos, and add entries to each group from the respective directory in the user's home directory. It is highly recommended that the user edit the configuration file manually. + +.SH COMMANDS +.SS Creating a Group +\fIterminal-media-launcher-config\fR requires at least one group. + +\fBaddGroup\fR +.RS +This command will create a new group with a specified name. By default, a new group is empty, with zero entries, no launching application specified, and no flags specified. If their is a space in the name, it must be written in quotes (ex. "TV Shows"). +.RE + +\fBsetLauncher\fR +.RS +This command will set a group's launching application. If no launching application is specified for a group, terminal-media-launcher will treat each entry in that group as an executable file. If their is a space in the path to the launching application, it must be written in quotes (ex. "/usr/bin/my launcher"). The path to the launching application should be absolute. +.RE + +\fBsetLauncherRaw\fR +.RS +This command is identical to \fIsetLauncher\fR with the exception that the launcher application specified will not be wrapped in quotes for the system call when a member of the group is launched. This can be used to specify more complex launching instructions. +.RE + +\fBsetFlags\fR +.RS +This command will set the flags to be specified for the launching application. If no launching application is specified, any specified flags are ignored. If the specified flags contain a space, they must be written in quotes. +.RE + +.SS Adding Entries +In order for a created group to be valid, it must contain at least one entry. + +\fBadd\fR +.RS +This command will add a file to a specified group if the path exists. It can also be used to add mutiple files to a group in one line using the '*' operator (ex. add /home/john/Pictures/* Pictures). If the path to the file(s) contains space(s), it must be written in quotes. +.RE + +\fBaddF\fR +.RS +This command will force an entry to be added to a specified group, regardless as to whether it is a valid file or not. Unlike \fIadd\fR, \fIaddF\fR's argument does not need to be a valid file, but \fIaddF\fR can only specify a single entry and does not support the '*' operator. If the arg has a space in it, it must be written in quotes. +.RE + +\fBaddName\fR +.RS +This command, like \fIadd\fR, will add an entry to a specified group if the path exists. \fIaddName\fR allows for a name to be specified for this entry (by default, the name is the same as the file name). Unlike \fIadd\fR, only one entry can be added per line, as \fIaddName\fR does not support the '*' operator. If either the name or file path contain a space, they must be written in quotes. +.RE + +\fBaddNameF\fR +.RS +This command can be used in place of \fIaddF\fR if you want the forced argument to have a different name displayed for the entry than is called in the system call to launch the entry. Otherwise, it is effectively the same as \fIaddF\fR. +.RE + +\fBaddR\fR +.RS +This command will recursively add entries to a group. \fIaddR\fR functions like \fIadd\fR, but will also search sub-directories for matches. +.RE + +\fBhide\fR +.RS +This command will remove a specified entry from a specified group. The entry argument should refer to the entry's name, rather than the entry's path. This option may be useful to hide certain entries after adding many entries with the '*' operator. +.RE + +\fBhideFile\fR +.RS +This command has the exact same functionality as \fIhide\fR, but takes the absolute path of the entry to hide as the first argument, instead of the name. +.RE + +.SS Settings +Settings should be specified at the top of \fIterminal-media-launcher-config\fR + +\fBautoAlias\fR on|off +.RS +This setting will attempt to automatically give entries more human-readable names by: + + 1. Removing any characters inside parenthesis (including parenthesis) + 2. Replacing '-' and '\_' with a space character + 3. Replacing cases of multiple spaces in a row with only one space + 4. Removing file extensions (if the file has an extension) + +\fIautoAlias\fR is turned off by default. +.RE + +\fBfoldCase\fR on|off +.RS +Entering any non-traversal input in terminal-media-launcher can be used to jump to a group or entry. For instance, hitting 'f' on the keyboard will jump the cursor to the next group or entry that starts with an 'f'. This setting determines whether or not this functionality is case insensitive (on) or case sensitive (off). \fIfoldCase\fR is turned on by default. +.RE + +\fBsort\fR on|off +.RS +This setting will sort entries of each group in alphabetical order (though not the list of groups). Turning off \fIsort\fR is only recommended when adding one item per line to a group. \fIsort\fR is turned on by default. +.RE + +.SH EXAMPLE + +.nf +autoAlias on + +# Adding a Group of Various Applications + +addGroup Applications +addName GIMP /usr/bin/gimp Applications +addName Chromium /usr/bin/chromium-browser Applications +addName Thunderbird /usr/bin/thunderbird Applications + +# Adding a Videos Group that contains mp4 files + +addGroup Videos +setLauncher Videos /usr/bin/vlc +add /home/john/Videos/*mp4 Videos + +.fi +# Adding a Pictures Group that contains only jpg and png files as well as all files from an external drive and a single desktop wallpaper +.nf + +addGroup Pictures +setLauncher Pictures /usr/bin/sxiv +setFlags Pictures "-s f" +add /home/john/Pictures/*jpg Pictures +add /home/john/Pictures/*png Pictures +addR "/mnt/External_Drive/Johns Photos/*" Pictures +addName "My Desktop Background" "/mnt/External_Drive/desktop wallpaper.jpg" Pictures + +.fi +.SH SEE ALSO +\fBterminal-media-launcher\fR(1) diff --git a/man/terminal-media-launcher.1 b/man/terminal-media-launcher.1 new file mode 100644 index 0000000..3ab827d --- /dev/null +++ b/man/terminal-media-launcher.1 @@ -0,0 +1,81 @@ +.TH TERMINAL-MEDIA-LAUNCHER 1 + +.SH NAME +terminal-media-launcher \- terminal media launcher + +.SH SYNOPSIS +terminal-media-launcher [-c|--config PATH] + +.SH DESCRIPTION +\fBterminal-media-launcher\fR is a TUI application designed to help streamline launching applications and other media. It aims to be a fast and minimal command line frontend with a Unix-like approach to setup and configuration. The program looks for a configuration file listing different groups of media and creates an ncurses menu from which the user can launch their media files. + +Upon execution, the program will look for a configuration file. If a configuration file is found, the program will draw two columns: one for groups, and one for entries. At the bottom of the window, a preview of the command execution is displayed. If a configuration file is not found, the user will be prompted whether or not they would like to have a configuration file automatically generated. + +.SH OPTIONS +\fB-c\fR, \fB--config\fR \fIpath\fR +.RS +Specify a configuration file path. +.RE + +\fB-h\fR, \fB--help\fR +.RS +Print a help message +.RE + +\fB-q\fR, \fB--quiet\fR +.RS +Suppress stdout messages +.RE + +.SH KEY BINDINGS +.B Up, Down +.RS +Move selection up and down on the focused column +.RE + +.B Tab, Left, Right +.RS +Toggle focus between group and entry columns +.RE + +.B PgUp +.RS +Jump to the top of the focused column +.RE + +.B PgDn +.RS +Jump to the bottom of the focused column +.RE + +.B F3 +.RS +Jump to a random row of the focused column +.RE + +.B Enter +.RS +Execute the selected entry +.RE + +.B Escape +.RS +Exit the program +.RE + +Any other input will jump to the next matching group/entry that begins with the input character, if one exists (ex. hitting 'f' while focused on the entries column will jump to the next entry that starts with an 'f' unless there is no entry that starts with an 'f'). + +.SH FILES +\fB~/.config/terminal-media-launcher/config (or ~/.terminal-media-launcher/config)\fR +.RS +When starting, terminal-media-launcher looks for a configuration file in the following order: + + 1. ~/.config/terminal-media-launcher/config + + 2. ~/.terminal-media-launcher/config + +You can specify a custom path using the -c option. For documentation of the config file, see \fBterminal-media-launcher-config\fR(5). +.RE + +.SH SEE ALSO +terminal-media-launcher-config(5) -- cgit