From fc87003435bbe4e4b235e0629e431492ec0dbb83 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Tue, 22 Jan 2013 21:09:35 -0500 Subject: document --notify --- bash-completion | 2 +- ponymix.1 | 4 ++++ ponymix.cc | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/bash-completion b/bash-completion index b9388c4..fc71557 100644 --- a/bash-completion +++ b/bash-completion @@ -9,7 +9,7 @@ in_array() { _ponymix() { local flags='-h --help -c --card -d --device -t --devtype - --source --input --sink --output + -N --notify --source --input --sink --output --sink-input --source-output' local types='sink sink-input source source-output' local verbs=(help defaults set-default list list-short diff --git a/ponymix.1 b/ponymix.1 index a396db9..59365db 100644 --- a/ponymix.1 +++ b/ponymix.1 @@ -14,6 +14,10 @@ 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\-N\fR, \fB\-\-notify\fR" +Create a libnotify notification for volume change events instead of printing +the new volume to standard output. Requires compile time support for libnotify. +Without support, this flag is a no-op. .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 diff --git a/ponymix.cc b/ponymix.cc index df8b1c7..48ae3dc 100644 --- a/ponymix.cc +++ b/ponymix.cc @@ -421,7 +421,7 @@ static int Kill(PulseClient& ponymix, int, char*[]) { static const Command& string_to_command(const char* str) { static std::map actionmap = { - // command name function arg min arg max + // command name function arg min arg max { "defaults", { ShowDefaults, { 0, 0 } } }, { "list", { List, { 0, 0 } } }, { "list-short", { ListShort, { 0, 0 } } }, @@ -462,6 +462,7 @@ static void usage() { " -c, --card CARD target card (index or name)\n" " -d, --device DEVICE target device (index or name)\n" " -t, --devtype TYPE device type\n" + " -N, --notify use libnotify to announce volume changes\n" " --source alias to -t source\n" " --input alais to -t source\n" " --sink alias to -t sink\n" -- cgit v1.2.3