Skip to content

WeeChat

Jason Charney edited this page Feb 29, 2016 · 14 revisions

🚧 UNDER CONSTRUCTION There's a lot of stuff that needs fixing in this. Also, don't use this until I fix the Ruby tutorial because of the pluggins.

WeeChat is an IRC client created by Sébastien Helleu

Advantages of Weechat over IRSSI

The biggest advantage of WeeChat over IRSSI is that WeeChat not only supports plugins written in PERL but also C, Lua, Python, and Ruby as well.

Installing Weechat

Weechat requires CMake,[libgcrypt, GnuTLS](Security Stuff) to install. Ideally, you should install Python and Ruby first too if you want to tinker with plugins.

Binaries Method (recommended).

Evidently, I hadn't though about installing WeeChat using the deb method, which is used by apt-get. It crossed my mind when I was working with Linux Mint on another computer and saw that Weechat had their own method to installing binaries. I'll need to write a page to remind myself to look for PPA files (assuming Raspbian supports that sort of thing) before diving head first into the binary territory.

$ sudo apt-get install pkg-config libncursesw5-dev libcurl4-gnutls-dev zlib1g-dev libgcrypt20-dev libgnutls28-dev
$ sudo apt-get install apt-transport-https
$ sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 11E9DE8848F2B65222AA75B8D1820DB22A11534E
$ sudo bash -c "echo 'deb https://weechat.org/raspbian jessie main' >/etc/apt/sources.list.d/weechat.list"
$ sudo bash -c "echo 'deb-src https://weechat.org/raspbian jessie main' >>/etc/apt/sources.list.d/weechat.list"
$ sudo apt-get update
$ sudo apt-get install weechat-curses weechat-plugins weechat-doc weechat-scripts

weechat-plugins is optional, but highly recommended. Because the current version of Raspbian came with a version of Ruby, there is a good chance that the version that you installed will likely be ignored in favor of the version that is in the Debian Jessie repo. In a perfect world, Matz would learn how to create a /etc/apt/sources.list.d/ruby.list file such that updating ruby would be easy rather than having to put up with RVM or Rbenv.

Alternatively for the development version, use this as the last line above instead. I don't recommend doing this unless you plan on doing something with it. Theirs also a source repo but I'm not going to post that here.

$ sudo apt-get install weechat-devel-curses weechat-devel-plugins

Source method

Initially, I had done it this way, but now I recommend the binary instructions. This way does include some plugin features.

$ sudo apt-get install pkg-config libncursesw5-dev libcurl4-gnutls-dev zlib1g-dev libgcrypt20-dev libgnutls28-dev
$ cd ~/Software
$ curl -SL https://weechat.org/files/src/weechat-1.3.tar.bz2 | tar xjv
$ weechat-1.3
$ mkdir build && cd build
$ cmake .. && make && sudo make install

Help on commands

Weechat help can be found using /help and to find help on a command, use /help command where command is a command name.

Get and set options

To see a preferences setting type /set (with a space at the end) and the press TAB. You can type part of a possible option and press TAB to autocomplete a setting. Once you've entered what you want to see, press ENTER.

/set config.section.option

To set a preference to a new value, do the same but add the value that you want to see.

/set config.section.option value

Wildcards can be accepted when viewing a setting.

/set config.section.*

The best part, you don't need to restart WeeChat after you change something. It's already set, likely to one of the .conf files in the ~/.weechat directory.

Set up weechat

TODO: Make a TLDR set of instructions later.

First open up Weechat.

$ weechat

We first need to set up a network. The most common network is the FreeNode network. We add this new network using the following command.

/server add freenode chat.freenode.net

Next set up your nicks. A "nick" or "nickname" is the handle or screen name that you will use on the network. Generally, you set several of these and put them in a comma separated list. If the first nick is taken, it use the next one and so on.

/set irc.server.freenode.nicks "nicky,nicky1,nicky2,nicky3,nicky4"

Next set up the username and real name.

/set irc.server.freenode.username "sticky_nicky"
/set irc.server.freenode.realname "Sticky Nicky"

A lot of people like to start up a network when they start up Weechat. If you're that kind of person, use this command to auto-connect to a server.

/set irc.server.freenode.autoconnect on

There are other instructions for SSL and SASL. If you are using Freenode, you don't really need to worry about those things. Read Weechat's documentation about those things.

Oh! One more thing, Free Node will ask you to identify yourself with a password with your since you already gave them a username. Use this command to do it automatically everytime.

/set irc.server.freenode.command "/msg nickserv identify oobergoober"

Other things to note:

  • Many commands can be comma separated
  • You can autojoin channels using /set irc.server.freenode.autojoin "#raspberrypi,##rtlsdr" which is equivalent to running /j #rasberrypi and /j ##rtlsdr
  • You can blank an option by setting the value to null. (example: /set irc.server.freenode.nicks null)
  • You can create options by adding an option to then end of a server command. I assume those will disappear if you set them to null. (example: /set irc.server.freenode.dooble "dooble,dooble_de_doo")

General commands

/connect [network|irc.network.org]        # connect to a network. You can only connect to one at a time.
/j[oin] #channel                          # join a channel
/part [parting message]                   # leave a channel with an optional message
/close                                    # close a server or channel buffer. (alias for /buffer close)
/me message                               # Show what you are doing
/msg user message                         # start a private message with a user
/buffer command                           # use a buffer command
/window command                           # use a window command
/exec [-o] command                        # execute a shell command. Add -o to show it in the buffer (and have others hate you for it if it is more than a few lines)
/key                                      # see a list of keybindings.  This command also sets keyboard commands if a key code and command are added..  Use with caution.
/script                                   # see a list of scripts that you can download, install, or remove that you can use with weechat.  It's like its own aptitude.

Keyboard Comands

  • F5/F6 : switch to previous or next buffer
  • F7/F8 : switch to previous or next window (especially when the screen is split)
  • F9/F10 : scroll the title bar left or right
  • F11/F12 : scroll nicklist up or down
  • Tab : complete tex in the input bar, like in your shell
  • PgUp/PgDn : scroll text in the current buffer
  • Alt+a : jump to the buffer with activity (n hotlist). If you have your keyboard set up for accent character, use the left Alt key

See Also

External Links

Setup

  1. [Assemble the Hardware](Assemble the Hardware)
  2. [Install the Software](Install the Software)
  3. 🆙 [Setup your Raspberry Pi](Setup your Raspberry Pi)
  4. [Download the Missing Parts](Download the Missing Parts)

Typical Utilities

  • [Downloading and extracting with curl and tar](curl and tar)
  • [Browsing with ls and cat](ls and cat)
  • [Searching with grep and find](grep and find)
  • [Filtering with sed and awk](sed and awk)
  • [Piping with less, pv, and tee](less, pv, and tee)
  • Monitor your system with htop
  • Multiplex with tmux

Clone this wiki locally