From 89e5f853b56023ea951085ee5b74594723644427 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Wed, 2 Jan 2013 22:48:35 -0500 Subject: add manpage Yay, the makefile is no longer a lie! --- ponymix.1 | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 ponymix.1 (limited to 'ponymix.1') diff --git a/ponymix.1 b/ponymix.1 new file mode 100644 index 0000000..470f294 --- /dev/null +++ b/ponymix.1 @@ -0,0 +1,99 @@ +.TH ponymix "1" "2013-01-02" "ponymix" "User Commands" +.SH NAME +ponymix \- cli volume control for PulseAudio +.SH SYNOPSIS +\fBponymix\fP [options] \fIoperation\fP [args] +.SH DESCRIPTION +\fBponymix\fP is a command line volume control for PulseAudio, letting you +perform many operations on both device and application sinks and source. +.SH OPTIONS +.PP +.IP "\fB\-c\fR, \fB\-\-card\fR \fICARD\fR" +Specify a card. By default, the card associated with the specified device +is used. Cards can be specified by name or numeric index. +.IP "\fB\-d\fR, \fB\-\-device\fR \fIDEVICE\fR" +Specify a device other than the default. Devices can be specified by name +or numeric index. +.IP "\fB\-t\fR, \fB\-\-devtype\fR \fITYPE\fR" +Specify a device type to examine, usually in conjunction with the \fB--device\fR +flag. \fITYPE\fR must be one of \fIsink\fR, \fIsource\fR, \fIsink-input\fR, or +\fIsource-output\fR. +.IP "\fB--sink\fR, \fB--output\fR" +Aliases to \fB--devtype\fR \fIsink\fR. +.IP "\fB--source\fR, \fB--input\fR" +Aliases to \fB--devtype\fR \fIsource\fR. +.IP "\fB--source-output\fR" +Alias to \fB--devtype\fR \fIsource-output\fR. +.IP "\fB--sink-input\fR" +Alias to \fB--devtype\fR \fIsink-input\fR. +.SH OPERATIONS +.SS Generic Commands +.IP "\fBhelp\fR" +Display the usage and exit. +.SS Device Commands +These commands are specific to devices. Not all devices will support +all the listed commands. +.PP +.IP "\fBlist\fR" +List all available devices. This can be filtered using the \fB--devtype\fR flag. +.IP "\fBlist-short\fR" +List all available devices in a parseable format. This can be filtered using the +\fB--devtype\fR flag. +.IP "\fBdefaults\fR" +Display the default sink and source. This is the default command if none +is specified. +.IP "\fBset-default\fR \fIDEVICE\fR" +Set a sink or source by name or numeric index as the default. +.IP "\fBget-volume\fR" +Get the volume of a device. +.IP "\fBset-volume\fR \fIVALUE\fR" +Set the volume of a device. \fIVALUE\fR is an integer between 0 and 150. +.IP "\fBget-balance\fR" +Get the balance of a device. +.IP "\fBset-balance\fR \fIVALUE\fR" +Set the balance of a device. \fIVALUE\fR is an integer from -100 (all left) to 100 +(all right). +.IP "\fBadj-balance\fR \fIVALUE\fR" +Adjust balance by the integer increment \fIVALUE\fR. The resulting balance has +the same bounds as those set by \fBset-balance\fR. The end-of-options indicator +(\fI--\fR) is required when passing a negative increment. +.IP "\fBincrease\fR \fIVALUE\fR" +Increase the volume percentage of a device or application by integer +VALUE. Increasing the volume in this way is capped at 100. +.IP "\fBdecrease\fR \fIVALUE\fR" +Decrease the volume percentage of a device by the integer \fIVALUE\fR. +Decreasing the volume in this way is capped at 0. +.IP "\fBmute\fR, \fBunmute\fR, \fBtoggle\fR" +Mute, unmute, or toggle the mute status of a device. +.IP "\fBis-muted\fR" +Check if a device is muted. ponymix will exit zero if muted, and non-zero +otherwise. +.IP "\fBmove\fR \fIDEVICE\fR" +Move a device's stream to the given device, specified using the \fI--devtype\fR +and \fI--device\fR flags. Note that a source output can only be moved to +another source, and a sink input can only be moved to another sink. +.IP "\fBkill\fR +Kill a device's stream, specified using the \fI--device\fR and \fI--devtype\fR +flags. This only applies to sink-inputs and source-outputs. +.SS Card Commands +These commands are specific to cards. +.PP +.IP "\fBlist-cards\fR" +List all available cards. +.IP "\fBlist-cards-short\fR" +List names for all available cards. +.IP "\fBlist-profiles\fR" +List profiles for a card. +.IP "\fBlist-profiles-short\fR" +List only names for the available profiles for a card. +.IP "\fBset-profile\fR" \fIPROFILE\fR +Set the specified profile for a card. + +.SH AUTHORS +.nf +Dave Reisner +Simon Gomizelj +.fi +.SH SEE ALSO +.BR pulseaudio (1) + -- cgit v1.2.3 From 244fa2d8b1ced32fd9f06ea6e44785d2fdd32b3c Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Thu, 3 Jan 2013 09:17:25 -0500 Subject: Cleanup manpage, reintroduce application commands section 99d86934399e9 implies that I lied. move and kill have special behavior since they only ever really operate on sink-inputs and source-outputs. Reflect this in Kill on the frontend, since it previously required the exact device type. --- ponymix.1 | 13 +++++++++---- ponymix.cc | 14 +++++++++++++- 2 files changed, 22 insertions(+), 5 deletions(-) (limited to 'ponymix.1') diff --git a/ponymix.1 b/ponymix.1 index 470f294..b222440 100644 --- a/ponymix.1 +++ b/ponymix.1 @@ -68,12 +68,17 @@ Mute, unmute, or toggle the mute status of a device. .IP "\fBis-muted\fR" Check if a device is muted. ponymix will exit zero if muted, and non-zero otherwise. +.SS Application Commands +These commands are specific to devices which refer to streams of applications. +For these commands, \fIsink\fR and \fIsource\fR are synonymous with \fIsink-input\fR +and \fIsource-output\fR, respectively. .IP "\fBmove\fR \fIDEVICE\fR" -Move a device's stream to the given device, specified using the \fI--devtype\fR -and \fI--device\fR flags. Note that a source output can only be moved to -another source, and a sink input can only be moved to another sink. +Move a device's stream to the given device, specified using the \fB--devtype\fR +and \fB--device\fR flags. Note that a source output can only be moved to +another source, and a sink input can only be moved to another sink. The type of +the target device will be inferred using this logic. .IP "\fBkill\fR -Kill a device's stream, specified using the \fI--device\fR and \fI--devtype\fR +Kill a device's stream, specified using the \fB--device\fR and \fB--devtype\fR flags. This only applies to sink-inputs and source-outputs. .SS Card Commands These commands are specific to cards. diff --git a/ponymix.cc b/ponymix.cc index 2f76905..31765fa 100644 --- a/ponymix.cc +++ b/ponymix.cc @@ -430,6 +430,17 @@ static int Move(PulseClient& ponymix, int, char* argv[]) { } static int Kill(PulseClient& ponymix, int, char*[]) { + switch (opt_devtype) { + case DEVTYPE_SOURCE: + opt_devtype = DEVTYPE_SOURCE_OUTPUT; + break; + case DEVTYPE_SINK: + opt_devtype = DEVTYPE_SINK_INPUT; + break; + default: + break; + } + auto device = string_to_device_or_die(ponymix, opt_device, opt_devtype); return !ponymix.Kill(*device); @@ -503,7 +514,8 @@ static void usage() { " mute mute device\n" " unmute unmute device\n" " toggle toggle mute\n" - " is-muted check if muted\n" + " is-muted check if muted\n", stdout); + fputs("\nApplication Commands:\n" " move DEVICE move target device to DEVICE\n" " kill DEVICE kill target DEVICE\n", stdout); -- cgit v1.2.3