WSBELL(4)

πŸ“¦ version 11.0, in nixpkgs unstable

πŸŽ€ WSBELL(4) πŸŽ€

okay bestie, welcome to the wsbell page β€” that's section 4 of the manual, the Kernel Interfaces Manual one, iykyk πŸ’… this is the generic bell support in wscons and honestly she's a little icon.

✨ NAME ✨

wsbell β€” generic bell support in wscons

🌸 SYNOPSIS 🌸

wsbell*    at spkr? console?

πŸ’– DESCRIPTION πŸ’–

So the wsbell driver utilizes the speaker(4) driver to give you a system bell with or without a keyboard, all for the wscons(4) framework 🫢. And when a bell character gets received on a wsdisplay(4) screen, wsbell sounds the bell. That's literally her whole job and she does it slayfully.

The wsconsctl(8) utility gives you access to several configurable parameters that affect the sound of the system bell β€” so yes, you can customize the vibe of your beep πŸ”₯.


πŸ¦‹ Ioctls πŸ¦‹

The following ioctl(2) calls are provided by the wsbell driver, and their definitions are found in dev/wscons/wsconsio.h ✨.

  • WSKBDIO_BELL β€” will sound the default bell. simple as that, no cap.
  • WSKBDIO_GETBELL β€” will return a struct wskbd_bell_data with the current bell parameters.
  • WSKBDIO_SETBELL β€” takes a struct wskbd_bell_data and uses it to set the bell parameters. these are used by the WSKBDIO_BELL ioctl(2) call.
  • WSKBDIO_COMPLEXBELL β€” will sound a bell using a supplied struct wskbd_bell_data for its parameters. fancy mode fr fr.
  • WSKBDIO_GETDEFAULTBELL β€” will return a struct wskbd_bell_data with the default bell parameters.
  • WSKBDIO_SETDEFAULTBELL β€” takes a struct wskbd_bell_data and uses it to set the default bell parameters.

Ioctls use the following structure πŸ‘‡

struct wskbd_bell_data {
        u_int   which;                  /* values to get/set */
#define WSKBD_BELL_DOPITCH      0x1     /* get/set pitch */
#define WSKBD_BELL_DOPERIOD     0x2     /* get/set period */
#define WSKBD_BELL_DOVOLUME     0x4     /* get/set volume */
#define WSKBD_BELL_DOALL        0x7     /* all of the above */
        u_int   pitch;                  /* pitch, in Hz */
        u_int   period;                 /* period, in milliseconds */
        u_int   volume;                 /* percentage of max volume */
};

like, the which field is the main character here β€” it decides which values to get/set, and you can go all in with WSKBD_BELL_DOALL 😌.

πŸ“ FILES πŸ“

  • /usr/include/dev/wscons/wsconsio.h.

🌈 SEE ALSO 🌈

speaker(4), wscons(4), wskbd(4), wsmux(4), wsconsctl(8), wsbell(9)


ok that's the whole page bestie, go make some iconic beeps πŸ’œ

De bian, June 13, 2017 β€” that's the source/version and date line, mwah πŸ’‹ thanks for reading, ily, bye πŸ§šβ€β™€οΈβœ¨

πŸ“¦ where this page comes from