This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.

Please visit our production wiki at https://wiki.gentoo.org

WeeChat

From Gentoo Wiki (test)
Jump to:navigation Jump to:search

WeeChat is a light, extensible, actively maintained, well documented, highly featured text-mode IRC client. WeeChat natively runs through ncurses for the text-mode interface, however for user convenience many 'remote' interfaces (GUIs) are available to relay WeeChat data to more accessible mediums (Android phones, Web interfaces, X GUIs, and more).

Installation

USE flags

USE flags for net-irc/weechat Portable and multi-interface IRC client

+alias Enable plugin for alias control
+buflist Enable buflist plugin
+charset Enable encoding conversions
+exec Enable exec plugin
+fifo Enable FIFO support (sh pipes)
+fset Enable fast set plugin
+irc Enable IRC protocol support
+logger Enable support for logging
+perl Add optional support/bindings for the Perl language
+python Add optional support/bindings for the Python language
+relay Enable relay plugin (experimental)
+scripts Build infrastructure for scripting
+spell Add dictionary support
+trigger Enable trigger plugin
+typing Enable typing plugin
+xfer Enable xfer plugin support
+zstd Enable support for ZSTD compression
doc Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally
enchant Enable spell checker plugin via Enchant instead of GNU Aspell
guile Add support for the guile Scheme interpreter
lua Enable Lua scripting support
man Build and install man pages
nls Add Native Language Support (using gettext - GNU locale utilities)
relay-api Enable json API support for the relay plugin (experimental)
ruby Add support/bindings for the Ruby language
selinux  !!internal use only!! Security Enhanced Linux support, this must be set by the selinux profile or breakage will occur
tcl Add support the Tcl language
test Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently)
verify-sig Verify upstream signatures on distfiles

Emerge

root #emerge --ask net-irc/weechat

Configuration

An excellent quick start guide can be found on WeeChat's website. The official guide should be followed for the most up to date configuration instructions. Head over there and read the guide. When finished return here if necessary for further instructions.

Auto-join channels

After making it through step 7 in the WeeChat quick start guide Freenode should be added as the server. Custom channels can be automatically joined each time WeeChat is opened by running the following command inside the WeeChat client:

/set irc.server.freenode.autojoin "#gentoo,#gentoo-chat"

This should add the #gentoo and #gentoo-chat channels to the auto-join list each time weechat starts. Add or subtract more more channels to the comma separated list as desired. Everyone has their own channels interests!

Adding a relay

In order to use remote interfaces, WeeChat needs to be configured as a relay.

/relay add weechat <port_number>

Next set the password for the relay:

/set relay.network.password <password>

Remote interfaces

The following remote interfaces are available:

  • Glowing Bear - A web frontend for WeeChat. See the Glowing Bear Guide for hosting Glowing Bear on Gentoo.
  • QWeeChat - A Qt interface for WeeChat.
  • WeeChat Android - Only works on Android phones. Simply download the application from the Google Play Store and get started!
  • Emacs - A weird emacs thing.
  • WeeCloud - A WeeChat client written in javascript.

Each remote interface has a unique setup. Not all of the clients available in the list above may be operational. Glowing Bear is probably the most tested of the bunch. When in doubt try Glowing Bear first.

Plugins

Plugins for WeeChat can be added and removed via USE flags. See the USE flags section above for a list of available plugins.

Hardening

Occasionally spammers/trolls will attempt to scrape IRC networks for any relevant information they can find exposed about the IRC connection. Those concerned about hardening can restrict WeeChat to not provide specific details concerning their use.

These options can be set by hand in the ~.weechat/irc.conf file.

CTCP

To block CTCP requests set an empty string:

/set irc.ctcp.version ""

Part and quit messages

Nullify the part and quit messages:

/set irc.server_default.msg_part ""
/set irc.server_default.msg_quit ""

Usage

It is common for many text-mode IRC client users to run the clients on a system that is always on always connected to the internet. This make it possible to never miss a mention or a message. Like most command-line programs, weechat will run all the time if opened in a screen or a tmux session which is then detached. This is currently the ideal method for staying connected to IRC networks continuously.

screen

Open screen using the following command:

user $screen -t weechat

After weechat is configured press Ctrl+a to enter Command Mode and then d to detach from the screen session. It can be re-attached to later by running:

user $screen -ls

To list the currently running sessions and then entering:

user $screen -r <session>

Where <session> is a weird, crazy string.

For additional information on how to use screen visit the screen article.

tmux

Simply open tmux using the following command:

user $tmux new -s weechat

By default a green status stripe should be visible near the bottom of the terminal. This is an indicator that tmux is running. Start weechat:

user $weechat

After weechat has been configured, disconnect from the session by using Ctrl+b and then press d to detach.

In order to reconnect to the tmux session that is running (which was titled "Template:Weechat") issue:

user $tmux a -t weechat

For additional information on how to use tmux visit the tmux article.

Upgrades

After emerging updates, weechat can be 'in-place' upgraded without losing the currently open buffer list. This is performed by running the following command inside the weechat client:

weechat/upgrade

See the upstream user guide for more additional details.

Removal

Unmerge

root #emerge --ask --depclean --verbose net-irc/weechat

Configuration and logs

After unmerging, for a full clean-up, be sure to remove old logs and individual user configuration from their default location in each weechat user's home directory:

user $rm -rf ~/.weechat

See also

  • Irssi — a powerful text-mode IRC client for connecting to internet relay chat (IRC) networks.

External resources