Commit graph

41 commits

Author SHA1 Message Date
Doug Torrance 1b4708cb92 Remove trailing whitespace in recently added dockapps. 2016-12-24 12:32:17 +00:00
Johannes Holmberg 5ca72823d7 Allow sound api to be specified in the config file 2015-09-17 03:23:07 +01:00
Johannes Holmberg 7678102e3b Better handling of configuration defaults for the new settings 2015-09-17 03:23:07 +01:00
Johannes Holmberg f28188a36b Improve monitor selection code
- Default to monitor 0 instead of failing if a crazy number is given
- Allow monitor to be specified by osdmonitor in the config file
2015-09-17 03:23:07 +01:00
Johannes Holmberg 3934bbe02f Add a command line option for choosing a monitor for osd display 2015-09-17 03:23:07 +01:00
Johannes Holmberg 5c08e40e12 Draw osd only on the primary monitor if randr extensions are available 2015-09-17 03:23:07 +01:00
Johannes Holmberg a0af850b29 Improve the osd update code
- More logical relationship between volume level and bar length
- No unnecessary drawing
- Volume bar shrinks properly even when volume is lowered very quickly
2015-09-17 03:23:07 +01:00
Johannes Holmberg 96ec41a88f Add native ALSA mixer support 2015-09-17 03:23:07 +01:00
Johannes Holmberg 5a441cd6de Fix a buffer overflow (how did this ever work?) 2015-09-17 03:23:07 +01:00
Doug Torrance 612921ae43 Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
Christophe CURIS 36febff3d5 wmix: increased version number to 3.2 after the recent changes
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-06-07 21:27:27 +01:00
Christophe CURIS d37962fd46 wmix: do not count space padding in channel short name when comparing names for exclusion
The names for channels provided by <sys/soundcard.h> have a padding with
space when their name is shorter than 6 characters, and this cause
excluding them difficult.
The new comparison code makes sure this padding is properly handled during
the match search.

Took the opportunity to bring light changes to try to improve the
readability of the channel listing code.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-06-07 21:27:27 +01:00
Christophe CURIS ccff1cf409 wmix: allow to choose device and exclude channels from the config file
Because that's the kind of option that could deserve to be saved in the
file. A device specified on the command line will take precedence; the
list of channel to exclude will be merged.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-06-07 21:27:27 +01:00
Christophe CURIS 67548f3b6a wmix: added an option to disable grabbing the volume control keys
There may be some case where user would like to fall back to the original
behaviour, for example if grabbing these keys could get in conflict with
other applications.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-06-07 21:27:27 +01:00
Christophe CURIS d83b160217 wmix: added error catch for XGrabKey on multimedia keys
If another application has already set a grab on these keys then the call
would fail (BadAccess) and wmix stop. With the X error handler, we can
display a warning to user and continue anyway.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-06-07 21:27:27 +01:00
Christophe CURIS 4379368290 wmix: added function to handle Multimedia keys related to volume
We can handle the keys AudioRaiseVolume, AudioLowerVolume and AudioMute,
so we ask the X server to send the key press event for them to us and
update the volume appropriately.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-06-07 21:27:27 +01:00
Christophe CURIS 3e2d8a730a wmix: always display the version information when verbose is asked
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-06-07 21:27:27 +01:00
Christophe CURIS d7add56750 wmix: release memory for startup-only configuration stuff after startup
A number of configuration options are useful only during the startup, so it
is possible to free them when ready.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-06-07 21:27:27 +01:00
Christophe CURIS b1fcdb1552 wmix: added appropriate message and fall back if user's color for OSD failed
It is generally not considered a good behaviour to leave user puzzled on
non-working request. With a little message at least he will know where to
look at.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>

Conflicts:
	wmix/config.c
2014-06-07 21:27:27 +01:00
Christophe CURIS 546bc1e49b wmix: rewrote parser of config file to report problems to user
The original parser would not say anything if the user had misspelled
something in the file which can be annoying. Now the parser will report
warnings for everything not understood with a message trying to be more
helpful to debug and fix.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-06-07 21:27:27 +01:00
Christophe CURIS 5b46b380e6 wmix: changed command line parsing code to report properly incorrect options
The original code did not abort when an invalid option was provided
or if there was non-options arguments on the command line.
The new code will report all problems found and stop to have the user
fix his command. It also remove some unnecessary pointer checks.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-06-07 21:27:27 +01:00
Christophe CURIS 676fc13cb2 wmix: be more verbose about the configuration file in use
If the config file was set by user with '-f', it would be a good idea to
report him if we're not able to load it.
Took opportunity to report to user that the config file is loaded if he
asked for verbose operations, so he can see if the default file loaded
is the one he expected.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-06-07 21:27:27 +01:00
Christophe CURIS b394e0bdba wmix: moved the initialisation of the config to the related file
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-06-07 21:27:27 +01:00
Christophe CURIS eb8be92aa8 wmix: moved parsing of Command-Line options to the config handling file
Took opportunity to re-order them alphabetically so they are easier to
work with, both for devs and for users.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-06-07 21:27:27 +01:00
Christophe CURIS 4c1bae53c4 wmix: created new file config.c to contain configuration related stuff
Management of the configuration is split in many places, the goal is to
regroup stuff together, starting with the loading from file stuff.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-06-07 21:27:27 +01:00
Christophe CURIS e2dc01bdc0 wmix: create the PID file only after successful initialisation
The PID file was created at the early beginning, but wmix can abort later
if something is not ok. It is better to create it at the end, so it will
be created only if wmix will actually be running.

Took the opportunity to move the code to a dedicated function to keep main
simple, and added a check to fix possible crash on startup if environment
variable $HOME does not exist.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-06-07 21:27:27 +01:00
Christophe CURIS 8eae1880b9 wmix: removed unused variable because a pixmap's mask is not used
The bitmap mask associated to the Led image on the knob was not used,
probably because the visual gain is negligible compared to the added
complexity to handle it.
So, as compiler warned about it, remove the variable.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-06-07 21:27:27 +01:00
Christophe CURIS 2d191d0e6c wmix: do not risk a crash (null-pointer-dereference) if $DISPLAY is not set
The original code merely assumed that an XOpenDisplay failure was caused
only by incapacity to connect to the X server, but if $DISPLAY was not set
then the fprintf would be given a NULL pointer which it may not appreciate
(depending on the libc in use).
Let's avoid that case and try to provide more info to help the user.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-06-07 21:27:27 +01:00
Christophe CURIS 4be6166084 wmix: fixed makefile to use PREFIX in a standard way (and with the standard default path)
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-06-07 21:27:27 +01:00
Christophe CURIS f5e5d2ffcb wmix: changed the makefile to use the standard practice LIBS variable for libraries
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-06-07 21:27:27 +01:00
Christophe CURIS 65f5baad33 wmix: install the man page at the same time as the program 2014-06-07 21:27:27 +01:00
Christophe CURIS 0243a0b9ed wmix: added description of channel naming in the man page
It may not be easy to understand how channels are names, particularly
when user wants to use a name to exclude a channel from the GUI. This
new sections answers all those questions.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-06-07 21:27:27 +01:00
Christophe CURIS 8833ff91d3 wmix: added new BUGS section in the man page
This is handy to let the user know about the possible strange behaviour he
may encounter and some limitations.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-06-07 21:27:27 +01:00
Christophe CURIS f18ecf27e9 wmix: more small improvements to the man page
This includes detailing more files of interest to user, spell-checking and
appearance, and few other things.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-06-07 21:27:27 +01:00
Christophe CURIS 46199b9170 wmix: added description of the syntax of the config file in the man page
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-06-07 21:27:27 +01:00
Christophe CURIS 8e7c63282c wmix: added missing command line options to the man page
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-06-07 21:27:27 +01:00
Christophe CURIS f41464febc wmix: fixed syntax of groff macros in the man page
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-06-07 21:27:27 +01:00
Christophe CURIS 501620e06d wmix: replaced man page with uncompressed version
This allows easier review/fix/patches. Furthermore, not all man tools
support compression and some distribution may use other compression
algorithm (bzip2, ...), so this should be handled at install time.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-06-07 21:27:27 +01:00
Alexey I. Froloff 792a5d290a Mass update FSF address
Signed-off-by: Alexey I. Froloff <raorn@raorn.name>
2012-06-05 20:50:13 +01:00
Alexey I. Froloff 31c2845466 Mass update GPLv2 from http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
Signed-off-by: Alexey I. Froloff <raorn@raorn.name>
2012-06-05 20:45:40 +01:00
Carlos R. Mafra eea379d833 Strip off version numbers from dir name 2012-02-12 22:50:31 +00:00