aboutsummaryrefslogtreecommitdiffstats
path: root/ponymix.cc
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2013-01-03 09:17:25 -0500
committerDave Reisner <dreisner@archlinux.org>2013-01-03 09:19:33 -0500
commit244fa2d8b1ced32fd9f06ea6e44785d2fdd32b3c (patch)
treed841d23380ff3e45835b5a89859c478bc344e35b /ponymix.cc
parent89e5f853b56023ea951085ee5b74594723644427 (diff)
downloadmirror-ponymix-244fa2d8b1ced32fd9f06ea6e44785d2fdd32b3c.tar.gz
mirror-ponymix-244fa2d8b1ced32fd9f06ea6e44785d2fdd32b3c.tar.bz2
mirror-ponymix-244fa2d8b1ced32fd9f06ea6e44785d2fdd32b3c.zip
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.
Diffstat (limited to 'ponymix.cc')
-rw-r--r--ponymix.cc14
1 files changed, 13 insertions, 1 deletions
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);