Table of Contents
Console Jabber Client (CJC) is simple Jabber client to run on a text terminal. It is far from being finished now, but it already has all basic functionality and is quite usable.
Table of Contents
When CJC is started the first time its screen consists of:
Top status bar
Main window with its status bar
Bottom status bar
Command line
This is the "plain" layout. Other layouts may be chosen by modifying the "layout" setting. Exact content of status bars is controlled by a theme.
The part of the screen where most information is displayed is a window. One of windows is the active window. By default there is only one window so it is the active window. When multiple windows are available, the active one may be changed using Alt+Tab key or /next, /prev commands.
The content of a window is a buffer. Usually there are many buffers in CJC, but only one may be displayed in a window. Buffer may contain: status messages, a chat session, the roster, etc. Buffers may be switched using Alt+number key (or Esc number on terminals where Alt/Meta is not available or not working) or /nextbuf, /prevbuf commands. A list of buffers containing anything new is displayed in the bottom status bar.
CJC is driven by commands. Commands are entered preceded with slash ('/'). There are global commands, like /quit, /connect, etc. and commands local to current buffer - e.g. /me is valid only in a chat window.
Command may require some arguments. Parameters may be optional (like reason for /quit), other are required (like user for /chat). Usually arguments must be quoted when they contain spaces or quotes, but some arguments don't need quoting and in fact cannot be quoted. Such argument is always the last argument for command and usually is some kind of message or description - like quit reason or chat message.
Examples of valid commands:
/quit
/quit I must go
/chat someone
/chat user@domain anything
/chat @domain
Username arguments (like the first argument of /chat command) may be roster names or JIDs. Usernames which don't contain '@' are always searched in roster, so to use JID which doesn't contain node part one must precede it with '@'.
Custom commands may be defined as aliases for other commands using /alias. There are some built-in aliases for some commands - these cannot be changed with /alias and /unalias commands.
There is an online help available for CJC commands. /help without arguments displays all available commands and built-in aliases. When given a command name as argument /help displays its description.
CJC is very customizable. Its behaviour is controlled by various settings, which may be modified with /set and /unset commands. /set without arguments displays all available settings with their values. /set with one argument displays value and description of named setting. /set with two arguments changes value of a setting.
Only two settings must be set to use CJC, these are: jid and password.
Examples of variable setting:
/set jid username@jabber.domain/CJC
/set away_priority 0
/set presence.auto_away_msg "I am gone"
Please note, that values containing spaces or quotes must be quoted.
Table of Contents
CJC may be started by entering just cjc on shell command line, but it can be given some arguments:
cjc [-c file ] [-t file ] [-l file ]
[-c file ] argument selects configuration file to use. If file contains slashes ('/') it is assumed to be in ~/.cjc/ directory.
[-t file ] selects theme to use (themes are searched in ~/.cjc/themes by default).
[-l file ] makes CJC write some debug logs to the file.
To connect to a jabber server you must first set the jid and the password settings. If your server differs from your JID's domain you should also set the server setting. When your server listens on nonstandard port number (other than 5222) you should set the port setting.
Example:
/set jid me@my.server/Home
/set password "very secret"
After configuring your account as described above you may connect to the server using /connect. After connection is established the presence is to "online" and the roster roster is retrieved.
Example:
/connect
To disconnect use the /disconnect command. Also the /quit command disconnect current connection. Both commands accept optional reason argument which will be sent to the server. Disconnection is not instant - it must take a while so the connection is closed cleanly and the reason is properly received by the server.
Example:
/disconnect
/disconnect I must go
Roster is a list of contacts. It is stored on the server and received just after connecting.
Roster view is kept in a separate buffer - it is usually the buffer number 2, so you can look at it using Alt+2. Contacts in roster are divided into groups. Additionally to the groups defined in the roster CJC may display three special groups in its roster buffer:
Each contact in roster buffer is displayed along with his presence information. Also the color of the entry depends of its presence.
By default all contacts are displayed, but this behaviour may be modified by changing the roster.show setting. Its value is one of the following: "all" (which is default and means all contacts), "available" (only those, who are currently available), "unavailable" (only those who are currently unavailable), "chat", "online", "away", "xa" (only those with named presence mode). Multiple values may also be given - separated by commas.
Users may be added to the roster using /add. The only required argument is user's JID. Group may be defined using [-group group] argument. The name of the new contact is defined by the last argument (not quoted).
Example - adds "friend@friendly.server" contact named "My Friend" to group "friends":
/add -group friends friend@friendly.server My Friend
Please note, that adding a contact to the roster doesn't mean subscription to its presence. Presence of the contact will not be known unless it is subscribed using /subscribe command.
Contacts may be removed using /remove command. The only (quoted) argument is user name or JID.
Example - both of the following commands remove contact added in the previous example:
/remove friend@friendly.server
/remove "My Friend"
Contact name may be changed using /rename command. The first argument is contact name or JID, the second (not quoted) is the new name.
Example - the friend is not a friend anymore:
/rename "My Friend" My Enemy
The list of groups user belongs to may also be changed - using /group command. This commands has two forms. The first argument is always a contact name or JID. In the first form the second argument is a new list of groups. In the second form it is list of group changes. Each of change is identified by group name preceded with "+" or "-" sign.
Example - the friend is not a friend anymore (cont). Both commands do the same:
/group "My Enemy" enemies
/group "My Enemy" -friends +enemies