Language Selection

English French German Italian Portuguese Spanish

A Collection of Tips and Tricks for XChat, Part 1

XChat is a GTK client for IRC, available on both Linux and Windows. It is one of the most popular and feature-rich IRC clients on the Linux platform, together with Konversation and KVirc. Of course, there are very good clients like Irssi too, but I'm talking only about graphical clients here.

Although by default XChat doesn't offer all the user-friendly options in its configuration dialogue, its true power stands in the possibility to configure it using /SET variables and Perl/Python scripts or even C plugins. You can practically make XChat behave in any way you want: from a powerful, personalised IRC client for daily use to an IRC help or trivia bot.

In my two recent articles I showed how to make simple Perl scripts for XChat which will change its default behaviour:

Make a Perl Script to Display Notices in Current Window
Make a Perl Script to PART/REJOIN a Channel Similar with mIRC's /HOP

In this article however I will list some of the tips and tricks I consider most popular and useful for the IRC user, leaving all that scripting behind.

Hide JOIN/PART messages using the conference mode
The conference mode can be turned on/off using the irc_conf_mode variable (which by default is 0 - disabled). By turning it on, the join/part and quit messages will not be displayed anymore, so you will be able to keep a log from an IRC meeting/tutorial/discussion without those annoying messages. Use it like this:

/SET irc_conf_mode 1

If you still want to see the messages on other channels, right-click on the channel button, go to Settings -> Hide Join/Part Messages. Tick (or un-tick, depending if you want to see them) this option.

Hide the backlog
Introduced in XChat 2.8.4, this feature will automatically display the last lines from a channel/private log when you open it again. If you want to turn this feature off use:

/SET text_replay 0

This will turn off the backlog.

Show the /WHOIS info in the current window
The /WHOIS information is shown in the status window by default. However if you are on a channel and you /WHOIS someone, you will probably want the information to be displayed in the same window, instead of having to switch on the status window to see it and then back on the channel. To do so, use:

/SET irc_whois_front 1

Change the way events are shown
You can do this using scripts, which provides a more flexible way of doing it, but I'll show here only how to use the Settings -> Advanced -> Text Events... dialogue.

For example, the Quit action looks like this by default:

%C23*%O$t%C23$1 has quit (%O%C23%B%B$2%O%C23)

However, you may also want to see the person's host, add the third parameter ($3 - host), as specified in the Number and Description fields:

%C23*%O$t%C23$1 ($3) has quit (%O%C23%B%B$2%O%C23)

See the screenshot below:

Change the location and format of logs
The default format for logs is %n-%c.log, which will log as network-channel/nick.log (e.g. FreeNode-#debian.log). The logs are kept by default in the ~/.xchat2/logs/ directory. However, you may change this and customise it to your likings:

~/logs_xchat/%n/%Y_%m_%d_%c.log

This will log all in the logs_xchat directory inside your home directory, creating a new folder for each network, and using several conversion specifiers for the filename. In the above example, I used:

%Y for full year digits (e.g. 2009)
%m for the number of the month (e.g. 01-12)
%d for the day number (e.g. 01-31)
%c for the channel/nickname

You can find all the conversion specifiers here.

Use shortcuts for last and previous commands
By default, the up and down arrows are used for these two actions. However I always prefered ^P (CTRL+P) for last command and ^N (CTRL+N) for next command. You can add these two in the Settings -> Advanced -> Keyboard Shortcuts... menu. The screenshot below shows how the ^P command should look like, after clicking Add New and filling the necessary fields. Don't forget to press Enter in the Data 1 field, otherwise the new shortcut will be lost after closing the window (I know, extremely annoying but that's the way XChat implements it).

That's it for today. In the next part I'll also include several simple scripts and more /SET tips. Also, I recommend to see this page (offsite), it has some great XChat resources, and eventually the XChat scripts and plugins page.

More in Tux Machines

Red Hat and Fedora

  • Is there need for Red Hat Certification training in Zimbabwe?
    A local institution is investigating the need to train Systems Administrators/Engineers who use Linux towards Red Hat certifications. The course is targeted at individuals with at least 2 years experience using Linux.
  • Red Hat, Inc. (NYSE:RHT) By The Numbers: Valuation in Focus
  • Fedora @ Konteh 2017 - event report
    This year we managed to get a booth on a very popular student job fair called Konteh. (Thanks to Boban Poznanovic, one of the event managers)
  • Fedora 26 Alpha status is NO-GO
    The result of the second Fedora 26 Alpha Go/No-Go Meeting is NO-GO. Due to blockers found during the last days [1] we have decided to delay the Fedora 26 Alpha release for one more week. There is going to be one more Go/No-Go meeting on the next Thursday, March 30th, 2017 at 17:00 UTC to verify we are ready for the release.
  • Fedora 26 Alpha Faces Another Delay
    Fedora 26 was set back by a delay last week and today it's been delayed again for another week. Fedora 26 Alpha has been delayed for another week when at today's Go/No-Go meeting it was given a No-Go status due to outstanding blocker bugs.

GNOME News: Gtef, GNOME 3.24 Release Video, Epiphany 3.24

  • Gtef 2.0 – GTK+ Text Editor Framework
    Gtef is now hosted on gnome.org, and the 2.0 version has been released alongside GNOME 3.24. So it’s a good time for a new blog post on this new library.
  • GNOME's GTK Gets Gtef'ed
    Developer Sébastien Wilmet has provided an overview of Gtef with this text editing framework having been released in tandem with GNOME 3.24. Gtef provides a higher level API to make it easier for text editing or in developer-focused integrated development environments.
  • The Official GNOME 3.24 Release Video Is Here
    By now you’re probably well aware that a new update to the GNOME desktop has been released — and if you’re not, where’ve you been?! GNOME 3.24 features a number of neat new features, welcome improvements, and important advances, most of which we’ve documented in blog posts during the course of this week.
  • A Web Browser for Awesome People (Epiphany 3.24)
    Are you using a sad web browser that integrates poorly with GNOME or elementary OS? Was your sad browser’s GNOME integration theme broken for most of the past year? Does that make you feel sad? Do you wish you were using an awesome web browser that feels right at home in your chosen desktop instead? If so, Epiphany 3.24 might be right for you. It will make you awesome. (Ask your doctor before switching to a new web browser. Results not guaranteed. May cause severe Internet addiction. Some content unsuitable for minors.)

today's howtos

AMDGPU Vega Patches and AMD Open-Sources Code

  • More AMDGPU Vega Patches Published
    Less than one week after AMDGPU DRM Vega support was published along with the other Vega enablement patches for the Linux driver stack, more Direct Rendering Manager patches are being shot out today.
  • AMD have announced 'Anvil', an MIT-licensed wrapper library for Vulkan
    AMD are continuing their open source push with 'Anvil' a new MIT-licenses wrapper library for Vulkan. It's aim is to reduce the time developers spend to get a working Vulkan application.
  • AMD Open-Sources Vulkan "Anvil"
    While waiting for AMD to open-source their Vulkan Linux driver, we have a new AMD open-source Vulkan project to look at: Anvil. Anvil is a project out of AMD's GPUOpen division and aims to be a wrapper library for Vulkan to make it easier to bring-up new Vulkan applications/games. Anvil provides C++ Vulkan wrappers similar to other open-source Vulkan projects while also adding in some extra features.