xfce4-mixer patchset
Natanael Copa
ncopa at alpinelinux.org
Mon Sep 24 11:22:46 CEST 2012
On Sun, 23 Sep 2012 19:42:19 +0200
Harald Judt <h.judt at gmx.at> wrote:
> Hi,
>
> Am 22.09.2012 19:29, schrieb Natanael Copa:
> > On Fri, 21 Sep 2012 23:17:16 +0200
> > Landry Breuil <landry.breuil at gmail.com> wrote:
> >
> >> I've tried building it, but failed since it inconditionally
> >> depends on a new thing (keybinder) not packaged yet on OpenBSD.
...
> > One way to do it without the keybinder dependency would be to add
> > commands line options which you could bind keys to:
> >
> > xfce4-mixer --volume-up
> > xfce4-mixer --volume-down
>
> Implementing these command line switches would be a total waste of
> time. There are already a lot of command-line tools (e.g. amixer)
> which can do such a job perfectly,
So if we want provide multimedia keys that works out-of-the-box on all
platforms, without adding keybinder dependency, what options do we have
really? I suppose the mentioned amixer is not available on
OpenBSD or any non-Linux.
Maybe have a configure option to libxfce4ui?
./configure --volume-up-command="mixerctl outputs.master=+10"
The configure script could autodetect it to something sane:
diff --git a/configure.ac.in b/configure.ac.in
index f5fcc52..fd21ace 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -154,6 +154,17 @@ AC_ARG_ENABLE([keyboard-library],
[enable_keyboard_library=$enableval],
[enable_keyboard_library=ye if test "x$enable_keyboard_library" =
"xyes"; then XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.8.0])
+ AC_CHECK_PROGS([MIXERPROG], [amixer mixerctl])
+ case "$MIXERPROG" in
+ amixer)
+ VOLUME_UP_CMD="amixer set Master 5%+"
+ VOLUME_DOWN_CMD="amixer set Master 5%-"
+ ;;
+ mixerctl)
+ VOLUME_UP_CMD="mixerctl outputs.master=+5"
+ VOLUME_DOWN_CMD="mixerctl outputs.master=-5"
+ ;;
+ esac
fi
AM_CONDITIONAL([ENABLE_KEYBOARD_LIBRARY], [test
"x$enable_keyboard_library" = "
@@ -333,6 +344,8 @@ echo "* Glade Interface Designer: no"
fi
if test x"$enable_keyboard_library" = x"yes"; then
echo "* Keyboard library support: yes"
+echo " - Volume up command: $VOLUME_UP_CMD"
+echo " - Volume up down: $VOLUME_DOWN_CMD"
else
echo "* Keyboard library support: no"
fi
-nc
More information about the Xfce4-dev
mailing list