Thoughts on Rails

Riding the Train of Thought

Archive for the ‘myprograms’ Category

Mute Master Volume – Script for FreeBSD/PCBSD

with one comment

For the FreeBSD users, there’s a bit of a problem when using laptops -
the special volume buttons are usually not automatically recognized.
The following page helps in configuring that:

http://blackk.union.edu/~black/freebsd/

For configuring the keypress/command association, we use the following port:

x11/xbindkeys

You might want to install the following port for making configuring
xbindkeys easier:

x11/xbindkeys_config

Now, there’s only one issue – the volume cannot be muted and unmuted
to its original setting automatically, here’s a small shell
script that resets volume to 60
[http://blackk.union.edu/~black/freebsd/xbindkeysrc]

I wrote a python script that uses commands from above file and
adds persistence of volume setting while automatically muting or
unmuting each time the script is called, also it relies heavily on
UNIX commands – since this script is necessary only on UNIX/FreeBSD.
It will not work under windows.

It also has a nice feature – soft fade-in / fade-out (configurable via script). Especially useful when you mute at high volume and forget it… then play some loud music and unmute – if done using this script, it might not shock with you with sudden loudness. :-)

All configuration is kept inside the script to keep usage of the script as easy as possible – just a call:

./mutetoggle.py

Hope it is useful to anyone looking to solve this or similar issue…

Here’s the file: mutetoggle.py.txt

Written by hiway

March 5, 2007 at 6:53 pm

Follow

Get every new post delivered to your Inbox.