3 ms·
I have this in my .bashrc beep() { if [ $? -eq 0 ] then file=/usr/share/sounds/purple/receive.wav ret='true' else file=/usr/sha
by ginko 3y ago
I have this in my .bashrc
beep() {
if [ $? -eq 0 ]
then
file=/usr/share/sounds/purple/receive.wav
ret='true'
else
file=/usr/share/sounds/purple/alert.wav
ret='false'
fi
(aplay $file 2>/dev/null >/dev/null &);
$ret
}
Can be called like this:
$ command ; beep
Depending on the return value it'll give a different alert. It preserves the return value so you can still chain other dependent commands after it.
This depends on the libpurple sounds to be where they are (works in ubuntu at least)