Difference between revisions of "WeeChat"

From ArchWiki
Jump to: navigation, search
m (Configuration Files)
(Guides)
(16 intermediate revisions by 9 users not shown)
Line 1: Line 1:
{{i18n|WeeChat}}
+
[[Category:Internet Relay Chat]]
 
{{Stub}}
 
{{Stub}}
 
{{Article summary start}}
 
{{Article summary start}}
 
{{Article summary text|WeeChat is a highly extendable and feature rich IRC Client currently under heavy development.}}
 
{{Article summary text|WeeChat is a highly extendable and feature rich IRC Client currently under heavy development.}}
 
{{Article summary heading|Alternative Clients}}
 
{{Article summary heading|Alternative Clients}}
{{Article summary wiki|Irssi}}
+
{{Article summary wiki|irssi}}
 
{{Article summary wiki|XChat}}
 
{{Article summary wiki|XChat}}
 
{{Article summary end}}
 
{{Article summary end}}
 
==Installing==
 
==Installing==
{{Package Official|WeeChat}} is available in the ['''extra'''] repo. Install by running:
+
{{Pkg|WeeChat}} is available in the ['''extra'''] repo. Install by running:
{{cli|# pacman -S weechat}}
+
{{bc|# pacman -S weechat}}
There is also {{Package AUR|weechat-git}} in the AUR, install with your favorite [[AUR Helper|AUR Helper]] or [[makepkg]].
+
There is also {{AUR|weechat-git}} in the AUR, install with your favorite [[AUR Helper|AUR Helper]] or [[makepkg]].
  
 
==Running WeeChat==
 
==Running WeeChat==
 +
 
WeeChat is going to have multiple interfaces at some point, run '''weechat-[interface]''' to start WeeChat.  
 
WeeChat is going to have multiple interfaces at some point, run '''weechat-[interface]''' to start WeeChat.  
  
 
As WeeChat currently only has a Ncurses interface the command to start WeeChat is:
 
As WeeChat currently only has a Ncurses interface the command to start WeeChat is:
{{cli|$ weechat-curses}}
+
{{bc|$ weechat-curses}}
  
 
== Configuration ==
 
== Configuration ==
You can configure WeeChat in 2 ways: internally, from the command line or by editing the .conf files located in ./weechat directly. WeeChat will automatically save settings on exit, so if you are editing a .conf file in an editor, be sure to run <code>/reload</code> from the console before exiting, otherwise your changes will be lost.
+
 
=== Internally ===
+
You can configure WeeChat in 3 ways: using WeeChat's internal commands; using '''iset'''; or by editing the .conf files directly. WeeChat will automatically save settings on exit, so if you are editing a .conf file in an editor, be sure to run {{ic|/reload}} from the console before exiting, otherwise your changes will be lost.
You can get a list of all configurable options by typing <code>/set</code> in the '''weechat''' buffer window. Since there are nearly 600 default configurable options, you can search through them with a wildcard syntax: <code>/set irc.server.*</code> or <code>/set *server*</code> as an example. You can get help on each option with the <code>/help</code> command:  
+
 
  /help irc.server.freenode.<option name>
+
=== Internal commands ===
 +
 
 +
You can get a list of all configurable options by typing {{ic|/set}} in the '''weechat''' buffer window. Since there are nearly 600 default configurable options, you can search through them with a wildcard syntax: {{ic|/set irc.server.*}} or {{ic|/set *server*}} as an example. You can get help on each option with the {{ic|/help}} command:  
 +
 
 +
  /help irc.server.freenode.autoconnect
 +
 
 +
=== Internal menu-based ===
 +
 
 +
For a more convenient method, install the '''iset''' script. If you have weechat 0.3.9, run:
 +
 
 +
/script install iset.pl
 +
 
 +
In older versions, use {{ic|/weeget install iset}}, or download [http://www.weechat.org/scripts/source/stable/iset.pl.html/ iset.pl] into your {{ic|~/.weechat/perl/autoload}} directory manually.
 +
 
 +
Afterwards, run
 +
 
 +
/iset
 +
 
 +
to get a buffer with all configuration options.
  
 
=== Configuration Files ===
 
=== Configuration Files ===
The .conf files for weechat are saved to <code>~/.weechat</code>. These files are not commented. Detailed information can be found within the program itself (see '''Internally''' above), or WeeChat's [http://www.weechat.org/files/doc/stable/weechat_user.en.html user guide].
+
 
 +
The .conf files for WeeChat are saved to {{ic|~/.weechat}}. These files are not commented. Detailed information can be found within the program itself (see '''Internally''' above), or WeeChat's [http://www.weechat.org/files/doc/stable/weechat_user.en.html user guide].
  
 
==Connecting to a server==
 
==Connecting to a server==
Line 32: Line 52:
 
Or if there is already a '''Server''' setup you can use:
 
Or if there is already a '''Server''' setup you can use:
 
  /connect freenode
 
  /connect freenode
 +
 
==Creating a Server profile==
 
==Creating a Server profile==
 
If you plan on connecting to a server more than once it may be beneficial to create a '''Server'''.
 
If you plan on connecting to a server more than once it may be beneficial to create a '''Server'''.
Line 40: Line 61:
  
 
==Configuring SSL==
 
==Configuring SSL==
Many IRC servers, including [http://freenode.net/ freenode] where [[IRC_Channel|#archlinux]] is, support SSL.
+
Many IRC servers, including [https://freenode.net/ freenode] where [[IRC Channel|#archlinux]] is, support SSL.
 +
 
 +
If you're making a server with '''/server''', add the SSL port (usually 6697) and '''-ssl''' to the end of the line. For example:
 +
 
 +
/server add freenode chat.freenode.net/6697 -ssl
  
If you're making a server with '''/server''' add '''-ssl''' to the end of the line, for example:
 
/server add FreenodeSSL chat.freenode.net/7000 -ssl
 
{{Warning|Some servers need the '''ssl_dhkey_size''' value changed to something lower. For example, if you're using freenode you'll need to set '''/set irc.server.FreenodeSSL.ssl_dhkey_size 1024'''}}
 
{{Box BLUE|Note:| Different servers may, and probably will have a different port than 7000 - this is server specific.}}
 
 
You can do the same thing if using '''/connect'''.
 
You can do the same thing if using '''/connect'''.
  /connect chat.freenode.net/7000 -ssl
+
 
 +
  /connect chat.freenode.net/6697 -ssl
 +
 
 +
{{Warning|Some servers need the '''ssl_dhkey_size''' value changed to something lower. For example, if you're using freenode you'll need to set '''/set irc.server.freenode.ssl_dhkey_size 1024'''}}
 +
 
 +
{{Box BLUE|Note:| Different servers may have a different port than 6697 - this is server specific.}}
  
 
==Tips and Tricks==
 
==Tips and Tricks==
 +
 
===Upgrading===
 
===Upgrading===
 
WeeChat can be upgraded without disconnecting from the IRC servers (non-SSL connections only):
 
WeeChat can be upgraded without disconnecting from the IRC servers (non-SSL connections only):
 
  /upgrade
 
  /upgrade
 
This will load the new WeeChat binary and reload the current configuration.
 
This will load the new WeeChat binary and reload the current configuration.
 +
 
===Aliases===
 
===Aliases===
 
Aliases can be created to simplify commonly executed commands. A nice example is Wraithan's '''smart filter''' alias:
 
Aliases can be created to simplify commonly executed commands. A nice example is Wraithan's '''smart filter''' alias:
Line 79: Line 107:
 
  /key bind meta2-1;5D /input move_previous_word
 
  /key bind meta2-1;5D /input move_previous_word
 
  /key bind meta2-1;5C /input move_next_word
 
  /key bind meta2-1;5C /input move_next_word
 +
 +
===SSH connection lost when idle===
 +
If you're connecting to your WeeChat through a remote shell using SSH, for example running it in [[screen]] or [[tmux]] you might experience getting disconnecting after a while when idle. There are multiple factors in play why this might happen, but the easiest way to change this is to force the connection to be kept alive by appending this to your SSH-configuration on the remote shell.
 +
This has nothing to do with WeeChat itself, but losing connection when idle won't happen with it's alternative [[irssi]] by default, and thus is a common situation for those converting to WeeChat.
 +
 +
{{hc|# /etc/ssh/sshd_config|2=
 +
ClientAliveInterval 300}}
 +
 +
Or just have a look at [http://mosh.mit.edu/ Mosh]
  
 
==Getting Help==
 
==Getting Help==
Line 84: Line 121:
 
  /help
 
  /help
 
and the help will be displayed in the main buffer (usually buffer 1).
 
and the help will be displayed in the main buffer (usually buffer 1).
 
  
 
==External Links==
 
==External Links==
Line 91: Line 127:
 
[http://www.weechat.org/scripts/ WeeChat Scripts] <br />
 
[http://www.weechat.org/scripts/ WeeChat Scripts] <br />
 
[http://dev.weechat.org/ WeeChat Development Blog]
 
[http://dev.weechat.org/ WeeChat Development Blog]
 +
 +
==Guides==
 +
[http://fixato.org/guides/setting_up_weechat.html FiXato's guide to WeeChat]
 +
[http://pascalpoitras.com/ Pascalpoitras Weechat Tips]

Revision as of 22:48, 8 July 2013

Tango-document-new.pngThis article is a stub.Tango-document-new.png

Notes: please use the first argument of the template to provide more detailed indications. (Discuss in Talk:WeeChat#)
Template:Article summary start

Template:Article summary text Template:Article summary heading Template:Article summary wiki Template:Article summary wiki Template:Article summary end

Installing

WeeChat is available in the [extra] repo. Install by running:

# pacman -S weechat

There is also weechat-gitAUR in the AUR, install with your favorite AUR Helper or makepkg.

Running WeeChat

WeeChat is going to have multiple interfaces at some point, run weechat-[interface] to start WeeChat.

As WeeChat currently only has a Ncurses interface the command to start WeeChat is:

$ weechat-curses

Configuration

You can configure WeeChat in 3 ways: using WeeChat's internal commands; using iset; or by editing the .conf files directly. WeeChat will automatically save settings on exit, so if you are editing a .conf file in an editor, be sure to run /reload from the console before exiting, otherwise your changes will be lost.

Internal commands

You can get a list of all configurable options by typing /set in the weechat buffer window. Since there are nearly 600 default configurable options, you can search through them with a wildcard syntax: /set irc.server.* or /set *server* as an example. You can get help on each option with the /help command:

/help irc.server.freenode.autoconnect

Internal menu-based

For a more convenient method, install the iset script. If you have weechat 0.3.9, run:

/script install iset.pl

In older versions, use /weeget install iset, or download iset.pl into your ~/.weechat/perl/autoload directory manually.

Afterwards, run

/iset

to get a buffer with all configuration options.

Configuration Files

The .conf files for WeeChat are saved to ~/.weechat. These files are not commented. Detailed information can be found within the program itself (see Internally above), or WeeChat's user guide.

Connecting to a server

You can connect to a IRC server by using /connect.

/connect chat.freenode.net

Or if there is already a Server setup you can use:

/connect freenode

Creating a Server profile

If you plan on connecting to a server more than once it may be beneficial to create a Server.

/server add example irc.example.net/6667

Would create the server example which would connect to irc.example.net on port 6667

See the WeeChat documentation and /help server for more information.

Configuring SSL

Many IRC servers, including freenode where #archlinux is, support SSL.

If you're making a server with /server, add the SSL port (usually 6697) and -ssl to the end of the line. For example:

/server add freenode chat.freenode.net/6697 -ssl

You can do the same thing if using /connect.

/connect chat.freenode.net/6697 -ssl
Warning: Some servers need the ssl_dhkey_size value changed to something lower. For example, if you're using freenode you'll need to set /set irc.server.freenode.ssl_dhkey_size 1024
Note: Different servers may have a different port than 6697 - this is server specific.

Tips and Tricks

Upgrading

WeeChat can be upgraded without disconnecting from the IRC servers (non-SSL connections only):

/upgrade

This will load the new WeeChat binary and reload the current configuration.

Aliases

Aliases can be created to simplify commonly executed commands. A nice example is Wraithan's smart filter alias:

Smart Filter
First, we need to enable smart filters:

/set irc.look.smart_filter "on"

Next, we will create the sfilter alias:

/alias sfilter filter add irc_smart_$server_$channel irc.$server.$channel irc_smart_filter *

We can now type

/sfilter

in any buffer, and the smart filter will only be enabled for that buffer.

The following alias will remove a previously enabled smart filter in the current buffer:
Add the alias:

/alias rmsfilter filter del irc_smart_$server_$channel

and execute it by

/rmsfilter

Key Bindings

Some helpful bindings:

To use ctrl-left/right arrow keys to jump to next/previous words on the input line:

/key bind meta2-1;5D /input move_previous_word
/key bind meta2-1;5C /input move_next_word

SSH connection lost when idle

If you're connecting to your WeeChat through a remote shell using SSH, for example running it in screen or tmux you might experience getting disconnecting after a while when idle. There are multiple factors in play why this might happen, but the easiest way to change this is to force the connection to be kept alive by appending this to your SSH-configuration on the remote shell. This has nothing to do with WeeChat itself, but losing connection when idle won't happen with it's alternative irssi by default, and thus is a common situation for those converting to WeeChat.

# /etc/ssh/sshd_config
ClientAliveInterval 300

Or just have a look at Mosh

Getting Help

To access WeeChat's built-in help, simply type

/help

and the help will be displayed in the main buffer (usually buffer 1).

External Links

WeeChat Home Page
WeeChat Documentation
WeeChat Scripts
WeeChat Development Blog

Guides

FiXato's guide to WeeChat Pascalpoitras Weechat Tips