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

How Google Does Open Source

Marc Merlin has been working as an engineer at Google since 2002 and has seen (and done) a lot of open source and Linux work during that time. Speaking at the LinuxCon North America event this week, Merlin provided a standing room only audience with an overview how Google uses and contributes to open source. "Google wouldn't be around today without open source software," Merlin said. Read more

High-end music player has a Raspberry Pi running Raspbian inside

Bryston has launched a high-end, compact “BDP-π” digital music player built on a Raspberry Pi running Raspbian, plus a HifiBerry “Digi+” audio HAT add-on. Bryston’s new Raspberry Pi-based BDP-π digital music player costs a hefty $1,295. Yet that’s less than half the cost of the highly acclaimed Bryston BDP-2 player, while offering many of these same features and much of the same high-end sound quality. The BDP-π is faster and more capable than the BDP-1, says the company. Read more

Leftovers: Gaming (Mighty No. 9 and Wine)

  • “Mighty No. 9” Mac & Linux Versions Released on Steam
    The creators of the Kickstarter-funded video game, Mighty No. 9, announced on Thursday they released the Mac and Linux versions of the game. This announcement comes just a little over two months after the game was delivered to North American and Asian backers via PS4, Xbox One, and PC. The team revealed that both Mac and Linux versions are now available on Steam.
  • Mac and Linux Versions of Mighty No. 9 Released
  • The Wine Stable Release 1.8.4 Is Now Available
    The Wine team released today fifth stable release of 1.8 branch of Wine. Version 1.8.4 has many small changes including 50 bugfixes. This stable release contains bugfixes, new cards were added to GPU description table, new features are included in development releases from 1.9 branch.

Android Leftovers

  • iPhones are much more likely to 'fail' than Androids
    Apple's once glittering reputation for quality took quite a few hits during the last few years, especially when it comes to iOS, the software that runs on iPhones. In some cases, recurrent software bugs have plagued users with issues such as the inability to use Wi-Fi, frequent crashes, and ridiculously short battery life. This week reports surfaced about a hardware flaw that makes some iPhone 6 screens inoperable. (Apple hasn't confirmed any related problems.) It's hard to tell how widespread some of these issues are, but a new report from a company that monitors smartphone quality suggests iPhones are far more likely to "fail" or suffer serious glitches than Android phones. The Blancco Technology Group says it collected performance data from millions of mobile phones during the second quarter of 2016, and it found that iPhones had an overall failure rate of 58 percent, compared to just 35 percent failure for Android devices. The term "failure" doesn’t necessarily mean that the phone has become a brick, according to Blancco. Instead, it means the device or software running on the device suffered some serious problem.
  • Maru OS is now open source (Turns Android phones into Linux desktops)
    Maru OS is a software project that lets you plug an Android phone into an external display to run desktop Linux software. First unveiled earlier this year, the software is very much a work-in-progress. Initially it only supported one phone: the Google Nexus 5. But things could get a lot more interesting soon, because the developer behind Maru OS has finished open sourcing the project and a group of developers are planning to start porting the software to run on additional devices.
  • Maru OS wants to turn your phone into a desktop with its latest open source build
    Not to be confused with Maru the adorable YouTube cat, Maru OS, the bite-sized Android add-on that turns your phone into a desktop, just went open source. Maru OS doesn’t change much about the way your phone operates on its own, but once you connect a desktop monitor via a slimport cable, Maru really comes to life. When connected to a display, Maru OS allows you to run a desktop Linux environment straight from your phone. Your phone is still a phone, it’ll take calls, send texts and do everything else it normally does, even while it’s connected to a desktop monitor running Linux on the side. It’s an interesting concept, but it’s still very much a work in progress. Today’s announcement could help move things along for Maru.