Hey

From Redbrick Wiki
Revision as of 04:51, 10 February 2007 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.

Hey is rather unique as instant messaging systems go. They're heavily customisable, highly personal and altogether different to IRC or the bigger instant messengers like MSN or AOL. They remain more popular among older generations of brickies but are still used by a lot of the newer ones too. Heys have a sense of humour all of their own and it is not uncommon for Redbrick users to make "heyfiles" which may contain humourous and/or incriminating heys.


Tutorial

Here's a tutorial on how to send and customise heys:

Sending heys

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 terminal, 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 heys

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

Heys can be configured in many different ways.

Borders

One of the most common features of hey that Redbrick users customise is the appearance of the border around the message. The default border when a user sends a hey looks like this:

Message from undone@murphy on pts/489 at [ Fri 15/Dec/2006 19:32:12 GMT ] ...
              ooooooooooooooooooooooooooooooooooooooooooooooooooo
              o This is what the default hey border looks like. o
              ooooooooooooooooooooooooooooooooooooooooooooooooooo
EOF

You can change this by adding the '-b' option when sending a hey. After the -b, you enter 9 characters in quotation marks that determine which characters go where. The So for example if you were to use it like this:

undone@murphy (~) -> hey -b "123456789" phaxx
This is a test.

You'll see this:

                              6222222222222222227
                              5 This is a test. 4
                              8333333333333333339

Each of the numbers the in the string corresponds to a different area of your border as follows:

1 = default

2 = top

3 = bottom

4 = right

5 = left

6 = top left

7 = top right

8 = bottom left

9 = bottom right


So if you try something like this:

undone@murphy (~) -> hey -b "o--||<><>" receive
This is also a test.

you'll get a hey border like this:

                            <---------------------->
                            | This is also a test. |
                            <---------------------->

You can send heys to yourself, so try experimenting with different characters in each position.

Title and footer

You can add a title and a footer to a hey using the -t and -o options when heying someone.

undone@murphy (~) -> hey -t "title" -o "footer" revenant
Hey, look at my title and footer!

creates a message like this:

                        -============= title ===============-
                        | Hey, look at my title and footer! |
                        -============= footer ==============-

Other options

There are a few other options you can play around with too, here's a list:

-w <wrap>        Specifies what column to wrap words at.
-t <title>       Specifies the title string for the message.
-o <title>       Specifies the footer 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.
-f <filename>    Spceifies a file of users to hey.
-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's an example of a hey syntax using some of these parameters.

undone@murphy (~) -> hey -t "Hello" -b " ::  [][]" -p "%u >> " joe5ie                                                            
joe5ie >> Hey joe5ie, I've always wondered, what's with that username?
joe5ie >> I mean, you've gotta admit it's kinda weird...
joe5ie >>
hey: joe5ie - groovy

and this creates:

       [::::::::::::::::::::::::::: Hello ::::::::::::::::::::::::::::]
         Hey joe5ie, I've always wondered, what's with that username?
         I mean, you've gotta admit it's kinda weird...
       [::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::]

Try experimenting some more with a few of these commands. If you have any problems, just ask Helpdesk. You can also get more info on these commands by typing "man hey" into your terminal.

Saving your settings

If you've come up with a nice hey border, or some settings that you'd like to use every time you send a hey, then you can set these up as defaults.

By changing some of your shell variables, you can make it so that all of your settings, like the border and title, will be in place every time you just type "hey username". To change those variables you'll have to edit your .rc file. The default shell on Redbrick is zsh, so you'll most likely be editing a file called ".zshrc". It's located in your home directory, so open the file by typing:

nano ~/.zshrc

Now you can add some of the following lines to the file, changing them to suit your needs.

export HEY_TITLE="Hello"
export HEY_BORDERS=" ::  [][]"
export HEY_WRAP=90
export HEY_SUCCESS="groovy"
export HEY_PROMPT="%u >> "

When you're done editing the file, press ctrl and x to save and then press y to accept the changes you've made. You can activate the changes by typing:

source ~/.zshrc

If you have any problems with this, or make a mistake when editing your .zshrc file, just talk to Helpdesk and we'll help you out. You can also create shell aliases, which allow you to run a long command through a much shorter one. Try adding a line like this to your .zshrc file in the same way as above.

alias joe='hey -t "Hello" -b " :: [][]" -p " %u >> " undone'

So now when you save and source the .zshrc file again, you'll start a hey with those settings every time you type "joe" at the command prompt. Doing this will allow you to have specific hey settings for any individual user you want.

Now that you've learned all this, it's time to get heying! Of course, if you have anything you else you'd like to know about hey, just ask a member of Helpdesk.

Links

c-hey.redbrick.dcu.ie - the C Hey project.

Hey tutorial - written by bubble and slightly out of date.

Hey map - a reloadable map of who is heying who on Redbrick. Written by phaxx and shadow.

Hey at Redbrick Encyclopedia - the Redbrick Encyclopedia entry on hey, written by Spock.

Heyfiles at Redbrick Encyclopedia - the entry about heyfiles, written by DoC.