Hey: Difference between revisions

From Redbrick Wiki
Jump to navigation Jump to search
Line 63: Line 63:


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


So if you try something like this:
So if you try something like this:

Revision as of 20:46, 15 December 2006

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 receiving 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

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 hey. 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 Sean, look at my title and footer!

creates a message like this:

                        -================ title =================-
                        | Hey Sean, 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 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

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