Hey

From Redbrick Wiki
Revision as of 19:11, 15 December 2006 by Undone (talk | contribs)

The hey program is one of RedBrick's most popular services. It lets you send instant messages to other users over the Redbrick network. It was developed and is maintained by RedBrick members and has since spread to various other servers including other college netsocs.

Below is a tutorial on how to get used to sending and recieving heys on RedBrick.


Sending a hey

Sending a hey is very simple. From the command prompt, type "hey" followed by the username you want to send the message to and hit return, like so:

undone@murphy (~) -> hey phaxx

This will start hey and let you write a message to "phaxx" or whoever you'd like to talk to. You can then start typing your message on the next line:

undone@murphy (~) -> hey phaxx
I think it's about time we updated the tutorial on how to send and receive heys and moved it to the wiki, don't you?

When you're done typing your message, hit return to move onto a new line. Then hold ctrl and press d to send the message. You should get a confirmation message telling you that the hey was sent successfully (the default confirmation message is "groovy") and then you'll be returned to the prompt. Then when phaxx checks his prompt, he'll see the message like this:

Message from undone@murphy on pts/489 at [ Fri 15/Dec/2006 18:43:20 GMT ] ...
     -====================================================================-
     | I think it's about time we updated the tutorial on how to send and |
     | receive heys and moved it to the wiki, don't you?                  |
     -====================================================================-
EOF


Receiving a hey

When someone sends you a hey, it will appear in your terminal similar to the above example. The name of the user who sent it to you as well as the time and date appears up top. "EOF" stands for "End of file", meaning simply that it's the end of the message.

Heys will automatically be sent to the terminal you've used most recently. This can be a little annoying as a hey may appear on top of something you were working on, or in the middle of an IRC session. Pressing ctrl and l together will clear the hey from your screen, but you can also decide what terminals you want to receive heys on through the 'mesg' command.

Type 'mesg' at your prompt to check whether or not you're currently receiving heys in that terminal.

undone@murphy (~) -> mesg
is y

This means that the terminal is set to receive heys, otherwise, it would be n. To change it simply enter either 'mesg n' or 'mesg y' at the prompt. Many users will set up a terminal simply for the purpose of receiving heys.

Customising Heys

However there are various other options that hey can take to personalise the messages you send:

   -w (wrap)        Specifies what column to wrap words at.
   -t (title)       Specifies the title string for the message.
   -b (borderstr)   Specifies the message's border.
   -s (successmsg)  Specifies message to print on success.
   -e (eofstring)   Specifies an alternative EOF string.
   -p (prompt)      Specifies the prompt string.
   -n (maxnames)    Specifies the maximum number of names prompted.
   -m               Ignore potentially annoying mesg n warnings.
   -c               Shows the credits.
   -h               Shows this listing.

Here is an example of a hey syntax using some of these parameters.

hey -t "DCUNS HELPDESK" -b "o--||++++" -p "Helping %u -- " skyhawk Helping skyhawk -- How Can I help you? Helping skyhawk -- skyhawk is logged on more than one place. Using (pts/50). hey: skyhawk - groovy

Most of these extra options are very self explanatory and are elaborated upon by typing man hey into your terminal

The -b switch deserves special explanation. This value sets the border around your hey. The easiest way to think of it is like this:

hey -b "123456789" username

  1 = default
  2 = top
  3 = bottom
  4 = right
  5 = left
  6 = top left
  7 = top right
  8 = bottom left
  9 = bottom right

You can try out various options until you find a border that you like by heying yourself. Receiving

Shell Settings

You may be saying to yourself I dont want to type all those options every time i want to send a hey. Never fear there is an easy solution.

You can create shell aliases, similiar to shortcuts in windows that allow you to type a single short command which you can set to run a longer command e.g a full hey syntax

alias hawk='hey -t "DCUNS HELPDESK" -b "o--||++++" -p "Helping %u >> " skyhawk'

The above line would then allow you to simply type hawk and it will send a hey with the defined hey settings.

To add an alias you must edit your .zshrc file. to do this type nano ~/.zshrc. Then add the alias you want and hit ctrl and x to save and y to accept the changes.

Now to activate the change type source ~/.zshrc

The above works fine for shortcuts to specific users, but lets say you want to change the look of the hey you send when you simply type hey username. This can also be done with some shell variables

Add the following to yout .zshrc file in the same manner as above, editing them to suit your needs

export HEY_TITLE="HELPDESK" export HEY_BORDERS="o--||++++" export HEY_WRAP=90 export HEY_SUCCESS="groovy" export HEY_PROMPT="%u >> "

Once again type source ~/.zshrc to activate the changes

The main method of getting used to heying is to do a lot of it until you get used to it or send a hey to a member of the helpdesk team. Happy Heying