shell version of a soundpad, mostly to be toxic in games.
pulseaudio/pipewire
ffmpeg
As hard as make install
You should have your sound files located in ~/.local/share/shellpad/sounds
, some files are there already as examples
each one starting with a unique number, then run the command shellpad <number>
to run it. you can also use shellpad cancel
to cancel an ongoing sound.
It's recommended to bind the commands to some key handler program, like sxhkd
.
This script takes advantaje of the pipe-source
module from pulseaudio
,
which generates a virtual audio source that redirects the audio input that it takes.
-
First it sets some variables that you could modify:
DEFAULT_MIC
: The original microphone that you use.VIRTUAL_MIC
: Location of where the virtual mic will be located.SOUNDS
: Directory where you keep all the sound files.PIPE_FILE
: File that contains the pipe module id.LOOP_FILE
: File that contains the loopback module id.SOUND_FILE
: Chosen sound file.
-
Checks if the process is already running and unloads the old modules if that's the case.
-
Loads the modules to be used and saves their ids.
-
Plays the sound.
-
Unloads the modules.