GithubHelp home page GithubHelp logo

alfsimen / hatcog Goto Github PK

View Code? Open in Web Editor NEW

This project forked from grahamking/hatcog

1.0 1.0 0.0 6.8 MB

IRC client in Python and Go. Text (curses) based. Plays nice with your window manager (and tmux)

Go 36.40% Python 63.60%

hatcog's Introduction

Install

Hatcogd is made up of two parts: hatcogd, a server written in Go, and hjoin, a client written in Python. hjoin connects to hatcogd, which connects to the remote IRC server.

cd /usr/local/bin
sudo ln -s ~/checkout/hatcog/bin/hatcogd-64 hatcogd  # Link either hatcogd-32 or hatcogd-64
sudo ln -s ~/checkout/hatcog/hjoin/hjoin.py hjoin    # Link hjoin
cd ~
cp checkout/hatcogd/.hatcogrc .   # Now edit it

Binaries of hatcogd (the Go part) are included for i686 32-bit Linux (bin/hatcogd-32) and x86_64 64-bit Linux (bin/hatcogd-64).

If on a different system (type arch on Linux to check), you'll need to build hatcogd. Get Go v1+. Make sure the hatcogd checkout is on your GOPATH, then type go build hatcogd. That will put a hatcogd executable in your current directory. Copy or symlink it from /usr/local/bin.

Run

Run hjoin <channel> e.g. hjoin test. There is no hash in front of the channel name.

Log files are in ~/.hatcog/.

To start a private conversation: hjoin -private=<nick>.

The first time (after reboot) you run hjoin, it starts the hatcogd daemon. When you /quit hjoin, the daemon stays running. If you want to kill the daemon, use hjoin --stop.

Details

hatcog is a text-based IRC client which plays well with tmux. The client is in Python / curses, the server in Go.

hatcog is made up of two programs: hatcogd, which connects to your irc server, and hjoin, which manages input/output for a single channel. hatcogd is started for you in the background, so usually you only interact with the curses client, hjoin.

The hjoin curses interface will display the following information, if available:

  • Top: Server name, time of last ping from server
  • Bottom: Your nick, channel name, channel url, number of active users in channel (spoke in last 10 minutes), number of users in channel.

Alerts

When someone says your name in a channel or sends you a private message, we try to play a sound and display a notification. You'll need to customise the sound command in .hatcogrc. The notification command should work as-is on Ubuntu.

A common way to display a notification in Ubuntu is using notify-send. I prefer to send myself an IM message, that way Pidgin handles displaying it on my desktop and making a sound. It works even if I am using hatcog on a remote machine over ssh. I use sendxmpp wrapped in a small bash script.

Supported commands

See hjoin/hfilter.py for a list. Anything you prefix with / is sent direct to the server. DCC is not supported.

Standard commands

  • /me : Display something differently. Try it: /me eats lunch.
  • /names : List users in channel.
  • /nick <new_nick> : Change your nickname.
  • /quit : Quit the client. You will part the channel. Server stays running (to stop server hjoin --stop).

Extra commands

Non-standard IRC commands:

  • /url : Open the most recent url (urls get underlined when displayed) in a browser. Command to open the browser is in .hatcogrc.
  • /notify : Alert me on all messages. Uses the same method of alerting you when someone says your nick, to alert you of every message. Useful for quiet channels, to notice when something happens. Do /notify again to switch it off.
  • /pw : Send your password to identify with NickServ. The client does this for you on startup (password is in .hatcogrc), so you should never need this.

Development

For development I use a local install of ircd-hybrid, and the 'test' channel on freenode.

Happy IRC-ing!

hatcog's People

Contributors

grahamking avatar

Stargazers

Alf Simen Sørensen avatar

Watchers

Alf Simen Sørensen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.