diff --git a/wmix/config.c b/wmix/config.c index 0414ea4..7034271 100644 --- a/wmix/config.c +++ b/wmix/config.c @@ -288,7 +288,24 @@ void config_read(void) *ptr = '\0'; /* Check what keyword we have */ - if (strcmp(keyword, "mousewheel") == 0) { + if (strcmp(keyword, "device") == 0) { + if (config.mixer_device == default_mixer_device) + config.mixer_device = strdup(value); + /* If not the default, keep the previous value because it was provided in the command-line */ + + } else if (strcmp(keyword, "exclude") == 0) { + int i; + + for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) { + if (config.exclude_channel[i] == NULL) { + config.exclude_channel[i] = strdup(value); + break; + } + + if (strcmp(value, config.exclude_channel[i]) == 0) + break; + } + } else if (strcmp(keyword, "mousewheel") == 0) { config.mousewheel = atoi(value); } else if (strcmp(keyword, "osd") == 0) { diff --git a/wmix/wmix.1x b/wmix/wmix.1x index 9b6f650..a749fb0 100644 --- a/wmix/wmix.1x +++ b/wmix/wmix.1x @@ -58,6 +58,15 @@ If readable, the file \fI~/.wmixrc\fP (or the file specified through \fB\-f\fR o is read on startup. It may contains one configuration command per line: .TP +device=<\fImixer_device\fP> +defines the device file to use instead of \fB/dev/mixer\fP +.TP +exclude=<\fIchannel_name\fP> +exclude the specified channel from control, you can use it as many times as needed (see +.SM +.B "CHANNEL NAMES" +below) +.TP mousewheel=<\fI0\fP|\fI1\fP> when set to \fI0\fP, disable the volume control through mouse wheel (default=\fI1\fP) .TP @@ -127,7 +136,7 @@ volume control .TP .I /dev/mixer Device used for controlling volume (change with option -.BR \-m ) +.BR \-m " or with command " device " in the config file)" .TP .I /usr/share/doc/wmix/README More information on the user interface