Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mpardalos/gc-geiger
Make a click sound when emacs does garbage collection
https://github.com/mpardalos/gc-geiger
Last synced: 23 days ago
JSON representation
Make a click sound when emacs does garbage collection
- Host: GitHub
- URL: https://github.com/mpardalos/gc-geiger
- Owner: mpardalos
- Created: 2024-03-11T21:22:51.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2024-03-11T21:23:44.000Z (10 months ago)
- Last Synced: 2024-11-28T21:42:23.689Z (28 days ago)
- Language: Emacs Lisp
- Size: 1000 Bytes
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gc-geiger mode
Make a click sound when emacs does garbage collection
## Installing
I use doom emacs, I assume if you are using emacs directly you know how to install packages.
## Doom emacs
In `packages.el`
``` emacs-lisp
(package! gc-geiger
:recipe (:host github :repo "mparalos/gc-geiger"))
```In `config.el`
``` emacs-lisp
(use-package! gc-geiger)
```## Customizing the sound
The variable containing the sound to be played when GC happens is `gc-geiger-sound`, it contains the raw data for the sound, obtained from a wav file.
There might be a better way to do this, but I have done it by embedding a base64 string in the emacs lisp code. To change the sound, first, get a .wav file of the sound you want to play.
Then, to get the base64 encoding of the wav file, you can use:``` sh
base64 -w 0 sound.wav
```Which will give you a (probably long) base64 string.
Finally, in your emacs config, add:
``` emacs-lisp
(setq gc-geiger-sound (base64-decode-string "the string from the previous command"))
```## Included sound source
The sound included in the package is `click6b.wav` by stijn, on freesound.org.
[Link to original file](https://freesound.org/people/stijn/sounds/43683/)