NXBELLD(1)

NAME
nxbelld - X daemon that performs an action every time the bell is rung

SYNOPSIS

nxbelld [-bDTiCq] [-t delay] [-F freq] [-v vol] [-d duration]
nxbelld [-bDTc] [-t delay] -f file
nxbelld [-bDT] [-t delay] -e cmd
nxbelld -?

DESCRIPTION
nxbelld is a tiny utility to aid people who either don't like the default PC speaker beep, or use a sound driver that doesn't have support for the PC speaker (e.g. the AD1981 chipset in the snd_hda_intel ALSA driver, as of 2008-04-06).

nxbelld performs a given action every time the X bell is rung. The actions nxbelld can currently perform include running a specified program, emulating the PC speaker beep using your sound card (default), or playing a PCM encoded WAVE file.

The actions involving the sound card are only available if nxbelld is compiled with sound support, which requires a supported sound API.

Currently, the following sound APIs are supported:

•   ALSA (default on most Linux distributions)

•   OSS (default on several BSD systems, including FreeBSD)

•   sndio (default on OpenBSD)

To convert your favorite sound files to a PCM encoded WAVE file, use:

    ffmpeg -i <file> -vn -acodec pcm_s16le out.wav

nxbelld can also throttle the bell if it is rung too often (e.g. some terminal program goes crazy), and/or disable the system's audible bell (so that you don't get the annoying PC speaker beep in addition to your nxbelld action).

OPTIONS

  Common Options

-b, --background
    Run nxbelld in the background.

-D, --keep-abell
    Don't disable the system audio bell on startup. The default is to disable the audio bell; that way, if you have a working PC speaker, you won't hear two beeps. You can always enable / disable the bell using xset(1).

-t, --throttle interval
    Interval (ms) during which subsequent bells are throttled.

-T, --test-bell
    Ring a test bell on startup. If you're experimenting with your PC speaker values, then you can try something like:

        pkill nxbelld; nxbelld -TF1000 -v100 -d200 &

    and play with the numbers until you're satisfied with the sound.

-?, --help
    Print the help screen and exit.

  Options to play an audio file

-c, --cache
    Cache the audio file in memory (less lag, especially when the disk is busy).

-f --wave-file file
    Name of the file to play when the bell is rung. The file must be a PCM encoded wave file.

  Options to produce a beep

-i, --sine
    Generate a sine wave beep.

-C, --complex
    Generate a more complex waveform beep, with a few higher harmonics.

    The result is a nice compromise between the too-piercing sine wave and the too-harsh square wave.

-q, --square
    Generate a square wave beep.

The default values of the following three options are from the bell parameters of the server. (These can be set via xset(1) for instance).

These options are only read on startup, and not every time the bell is played, so if you change your bell parameters, you should restart nxbelld for the change to take effect.

-d, --duration
    Duration of the beep in milliseconds.

-F, --frequency
    Frequency of the beep in hertz.

-v, --volume
    Volume of the beep (0 -- 100).

  Options to execute an external command

-e, --command cmd
    Command to execute when the bell is rung.

COMPATIBILITY WITH GAUTAM IYER'S XBELLD
nxbelld should mostly be backwards compatible with xbelld, with the only exception being the -e (--command) option. In Gautam Iyer's xbelld, it has to be the last option, and all following command line arguments are considered to be the external command to execute once the bell is rung.

nxbelld accepts a single string argument for the --command option, and doesn't impose a limitation on where it has to be on the command line. This means that if the external command consists of several whitespace-separated words, it has to be quoted and properly escaped.

BUGS
When using sndio, the beeps are slightly shorter than the specified beep duration. Beeps of 120 ms or shorter don't get played at all. This can be worked around simply by specifying a longer duration using the --duration option.

SEE ALSO
Project site: <https://github.com/dusxmt/nxbelld>

Project site of the original xbelld: <https://gitlab.com/gi1242/xbelld>

AUTHORS
Gautam Iyer <gi1242@users.sourceforge.net>

Marek Benc <dusxmt@gmx.com>