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>
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>
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>
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>
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>
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>
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>
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>
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>
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>