From 7703fe0007f15801faee07048e21b3d7f4b6716a Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Thu, 15 Dec 2011 13:13:19 +0100 Subject: Rename config.ini to just config --- Makefile.am | 2 +- configure.ac | 2 +- data/Makefile.am | 2 ++ data/config | 44 ++++++++++++++++++++++++++++++++++++++++++++ src/Makefile.am | 3 --- src/config.c | 2 +- src/config.ini | 44 -------------------------------------------- 7 files changed, 49 insertions(+), 50 deletions(-) create mode 100644 data/Makefile.am create mode 100644 data/config delete mode 100644 src/config.ini diff --git a/Makefile.am b/Makefile.am index af437a6..9768a98 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1 +1 @@ -SUBDIRS = src +SUBDIRS = src data diff --git a/configure.ac b/configure.ac index 1ef1992..0e1d627 100644 --- a/configure.ac +++ b/configure.ac @@ -21,7 +21,7 @@ AM_SILENT_RULES([yes]) AC_CONFIG_SRCDIR([src/pa-sink-ctl.c]) AC_CONFIG_HEADERS([config.h]) -AC_CONFIG_FILES([Makefile src/Makefile]) +AC_CONFIG_FILES([Makefile src/Makefile data/Makefile]) # Checks for programs. AC_PROG_CC diff --git a/data/Makefile.am b/data/Makefile.am new file mode 100644 index 0000000..83b78bc --- /dev/null +++ b/data/Makefile.am @@ -0,0 +1,2 @@ +pa_sink_ctl_xdgdir = $(sysconfdir)/xdg/pa-sink-ctl +dist_pa_sink_ctl_xdg_DATA = config diff --git a/data/config b/data/config new file mode 100644 index 0000000..cd658f1 --- /dev/null +++ b/data/config @@ -0,0 +1,44 @@ +[pa-sink-ctl] + +## List of properties to try to use as sink names, or sink name itself if empty. +name-properties = device.description; device.product.name + +[input] +## Key starting with a 0 and length > 1 are encoded in octal or hexadecimal, +## depending on second character being an 'x'. +## See ncurses.h for other presudo-character tokens +up = 0403:k;w +down = 0402;j;s +volume-down = 0404;h;a +volume-up = 0405;l;d +mute = m;x;M; +# switch sink input using return, tab or space +switch = 0xa;0x9; ; +# quit on q or escape +quit = q;033 + +## Priority groups can be used to set the display +## order for sinks. Priority groups start with "priority". +## "match": a pulseaudio property to match against (use pacmd list-sinks) +## "value": the string to compare with +## "priority": ..to assign to matched sink (default 0) +## Note: Order matters, first matched priority is applied! + +#[priority 0] +#match=device.product.name +#value=SBx00 Azalia (Intel HDA) +#priority=2 +# +#[priority 1] +#match=device.product.name +#value=USB Headset +#priority=1 + +[priority headset] +match=device.form_factor +value=headset +priority=-1 +[priority filter] +match=device.class +value=filter +priority=-2 diff --git a/src/Makefile.am b/src/Makefile.am index 0d527f6..19decc4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -12,6 +12,3 @@ AM_CPPFLAGS = $(PULSE_CFLAGS) $(PULSE_MAINLOOP_CFLAGS) $(GLIB_CFLAGS) \ pa_sink_ctl_LDADD = $(GLIB_LIBS) $(PULSE_LIBS) $(PULSE_MAINLOOP_LIBS) $(CURSES_LIBS) noinst_HEADERS = interface.h command.h config.h pa-sink-ctl.h sink.h unix_signal.h - -pa_sink_ctl_xdgdir = $(sysconfdir)/xdg/pa-sink-ctl -dist_pa_sink_ctl_xdg_DATA = config.ini diff --git a/src/config.c b/src/config.c index 41dad73..34ccc90 100644 --- a/src/config.c +++ b/src/config.c @@ -168,7 +168,7 @@ config_init(struct config *cfg) for (i = 0; i < G_N_ELEMENTS(dirs_array); ++i) { error = NULL; if (g_key_file_load_from_dirs(cfg->keyfile, - "pa-sink-ctl/config.ini", + "pa-sink-ctl/config", (const gchar **) dirs_array[i], NULL, G_KEY_FILE_NONE, &error) && !error) diff --git a/src/config.ini b/src/config.ini deleted file mode 100644 index cd658f1..0000000 --- a/src/config.ini +++ /dev/null @@ -1,44 +0,0 @@ -[pa-sink-ctl] - -## List of properties to try to use as sink names, or sink name itself if empty. -name-properties = device.description; device.product.name - -[input] -## Key starting with a 0 and length > 1 are encoded in octal or hexadecimal, -## depending on second character being an 'x'. -## See ncurses.h for other presudo-character tokens -up = 0403:k;w -down = 0402;j;s -volume-down = 0404;h;a -volume-up = 0405;l;d -mute = m;x;M; -# switch sink input using return, tab or space -switch = 0xa;0x9; ; -# quit on q or escape -quit = q;033 - -## Priority groups can be used to set the display -## order for sinks. Priority groups start with "priority". -## "match": a pulseaudio property to match against (use pacmd list-sinks) -## "value": the string to compare with -## "priority": ..to assign to matched sink (default 0) -## Note: Order matters, first matched priority is applied! - -#[priority 0] -#match=device.product.name -#value=SBx00 Azalia (Intel HDA) -#priority=2 -# -#[priority 1] -#match=device.product.name -#value=USB Headset -#priority=1 - -[priority headset] -match=device.form_factor -value=headset -priority=-1 -[priority filter] -match=device.class -value=filter -priority=-2 -- cgit