Jump to content

Recommended Posts

Posted

no, not like the predecessor to cell phones. This is a tiny shell script for anybody with the following on their computer:

  • bash

Gaim

beep

sudo (fakeroot doesn't work)

What it is is a simple script that lets you have the computer beep out of the internal speaker with different tones and patterns for each Gaim event (Buddy logs in/out, message sent, message received, name said in chat room). To make it work, first install the packages (make sure to install beep), then in Gaim's Preferences>Sound change Method to Command and then change the command to:

sudo sh <PATH TO SCRIPT> %s

Here's the script:

case "$1" in

        #Message Received

        "/usr/share/sounds/gaim/receive.wav")

        beep -f 523.2 -l 150 -n -f 440.0 -l 150

       ;;

        #Message Sent

        "/usr/share/sounds/gaim/send.wav")

        beep -f 440.0 -l 150 -n -f 523.2 -l 150

       ;;

        #Buddy In

        "/usr/share/sounds/gaim/arrive.wav")

        beep -f 493.9 -l 50 -r 2

       ;;

        #Buddy Out

        "/usr/share/sounds/gaim/leave.wav")

        beep -f 261.6 -l 50 -r 2

       ;;

        #Name said in chat

        "/usr/share/sounds/gaim/redalert.wav")

        beep -f 261.6 -l 25 -n -f 293.7 -l 25 -n -f 329.6 -l 25 -n -f 349.2 -l 25 -n -f 392.0 -l 25 -n -f 440.0 -l 25 -n -f 493.9 -l 25 -n -f 523.2 -l 25

       ;;

        *)

        beep

        echo "$1" >> temp.txt

       ;;

esac

Make sure that you have access to /dev/console in your /etc/sudoers file and if you require it to enter a password for sudo, you can simply change the command to:

echo "PASSWORD" | sudo sh <PATH TO SCRIPT> %s

You may also need to chanfe the path to the sound files in the script to whatever gaim has them set to. If you made custom sounds, set it to those, otherwise, I found the files by using the following command:

locate *.wav | grep gaim

Tell me what you think.

Posted

lights, now theres an idea. whats the voltage on the PC speaker? i'm sure it would be far less annoying if you replaced it with a LED. sure wolfenstein wouldn't be the same anymore but i don't think i could handle a beep every time i got a message, even if you did alter the pitch.

Posted

I'm sure it is possible to make the speaker into an LED, but if I was in clear view of my computer (and hence my monitors), I would just disable dpms and have guifications. Of course, an interesting thing would be to have it turn off and on the lights in the room if the chat window wasn't in focus...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...