tiny - Yet another console IRC client

Travis Build Status MIT licensed crates.io

tiny is an IRC client written in Rust.

tiny in action

tiny in action

Features

Installation

Install the Rust nightly toolchain, clone the repo, and run cargo install (or cargo install --force if you already have an older version installed). There's currently no way to publish a crate on crates.io without publishing all the dependencies, so tiny won't be on crates.io for a while.

tiny is tested on Linux and OSX.

Configuration

When tiny couldn't find a config file at ~/.tinyrc.yml it creates one with some defaults and exits. Edit that file before re-running tiny to change the defaults. If you want to create the file yourself, the default file looks like this:

```yaml

Servers to auto-connect

servers: - addr: irc.mozilla.org port: 6667 hostname: yourhost realname: yourname nicks: [tinyuser] autocmds: - 'msg NickServ identify hunter2' - 'join #tiny'

Defaults used when connecting to servers via the /connect command

defaults: nicks: [tinyuser] hostname: yourhost realname: yourname autocmds: []

Where to put log files

logdir: '/home/user/tinylogs'

Color theme based on 256 colors (if supported). Colors can be defined as color

indices (0-255) or with their names.

#

Accepted color names are:

default (0), black (0), maroon (1), green (2), olive (3), navy (4),

purple (5), teal (6), silver (7), gray (8), red (9), lime (10),

yellow (11), blue (12), magenta (13), cyan (14), white (15)

#

Attributes can be combined (e.g [bold, underline]), and valid values are bold

and underline

colors: nick: [ 1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14 ]

clear:
    fg: default
    bg: default

user_msg:
    fg: black
    bg: default

err_msg:
    fg: black
    bg: maroon
    attrs: [bold]

topic:
    fg: cyan
    bg: default
    attrs: [bold]

cursor:
    fg: black
    bg: default

join:
    fg: lime
    bg: default
    attrs: [bold]

part:
    fg: maroon
    bg: default
    attrs: [bold]

nick_change:
    fg: lime
    bg: default
    attrs: [bold]

faded:
    fg: 242
    bg: default

exit_dialogue:
    fg: default
    bg: navy

highlight:
    fg: red
    bg: default
    attrs: [bold]

completion:
    fg: 84
    bg: default

timestamp:
    fg: 242
    bg: default

tab_active:
    fg: default
    bg: default
    attrs: [bold]

tab_normal:
    fg: gray
    bg: default

tab_new_msg:
    fg: purple
    bg: default

tab_highlight:
    fg: red
    bg: default
    attrs: [bold]

```

Command line arguments

By default (i.e. when no command line arguments passed) tiny connects to all servers listed in the config. tiny considers command line arguments as patterns to be matched in server addresses, so you can pass command line arguments to connect to only a subset of servers specified in the config. For example, in this config:

```yaml servers: - addr: irc.mozilla.org ...

- addr: chat.freenode.net
  ...

```

By default tiny connects to both servers. You can connect to only the second server by passing freenode as a command line argument.

Key bindings

Commands

Commands start with / character.

Development

tiny is in early stages of development. Some of features that you might think are essential may be missing. Please open an issue for those features (or even better, a pull request!).

Being a Rust n00b, I spent a lot of time trying to convince borrow checker, failing at that, and either adding bunch of ugly hacks (e.g. instead a loop that modifies single element implementing a loop that finds an index and modifying that index after the loop), or using a simpler but less efficient code (e.g. cloning things redundantly to avoid borrow checking). Still, I think the connection manager (conn.rs) and UI parts (tui module) are not too bad. Mess is mostly in lib.rs which implements the main logic (command and message handling etc.).

Any suggestions / code reviews / pull requests are very welcome!

If you're looking to contribute, see TODOs below. If you don't know where to start, open an issue and I'd love to help.

TODOs