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 Financial News

Leftovers: OSS and Sharing

  • What does it mean to change company culture?
    Tools are specific concrete things that a culture has decided is a way to improve a process. Buckminster Fuller has a great quote about tools and thinking: "If you want to teach people a new way of thinking, don't bother trying to teach them. Instead, give them a tool, the use of which will lead to new ways of thinking." In particular, DevOps tools can provide folks new ways to look at things—like delivering code into a production environment, for example. But there's lots of examples where a new tool doesn't influence the thinking of the people who use it, so things don't change.
  • Why Open Beats Closed
  • Google Improves Image Recognition; Releases Project as Open Source Software
    Google says its algorithm can correctly caption a photograph with nearly 94 percent accuracy. The company says the improvements come in the third version of its system named Inception, with the score coming from a standardized auto-caption test named ImageNet. It reports the first version scored 89.6 percent, the second 91.8 percent and the new one 93.9 percent.
  • Contributing to Open Source Projects Not Just For the Experts
    XDA has long been a proponent of open source development, and we’ve seen it flourish over the years. In fact, it’s one of the main reasons our community has grown as fast as it has over these past 13 years, with Android’s core being the driving force. Many people desire to be part of open source and contribute but often don’t know how they can, whether because they think they lack the skills or they just don’t have the time.
  • Firefox Reader Mode is Finally Getting a Keyboard Shortcut
    Among the changes which arrived in the September release of Firefox 49 were an enhanced set of Reader Mode features, including spoken narration and line-width spacing options. All very welcome. But the improvements aren’t stopping there. Firefox 50, which is due next month, will add another sorely needed feature: a keyboard shortcut for Reader Mode. Y
  • Introduction to OpenStack by Rich Bowen
    In this talk, Rich, the OpenStack Community Liaison at Red Hat, will walk you through what OpenStack is, as a project, as a Foundation, and as a community of organizations.
  • How Microsoft Measures Open Source Success [Ed: Wim Coekaerts got a bigger salary offer from Microsoft than from Oracle so now he’s propagandist/EEE in chief]
  • Public licenses and data: So what to do instead?
    Why you still need a (permissive) license Norms aren’t enough if the underlying legal system might allow an early contributor to later wield the law as a threat. That’s why the best practice in the data space is to use something like the Creative Commons public domain grant (CC-Zero) to set a clear, reliable, permissive baseline, and then use norms to add flexible requirements on top of that. This uses law to provide reliability and predictability, and then uses norms to address concerns about fairness, free-riding, and effectiveness. CC-Zero still isn’t perfect; most notably it has to try to be both a grant and a license to deal with different international rules around grants.
  • NIST Releases New 'Family' of Standardized Genomes
    With the addition of four new reference materials (RMs) to a growing collection of “measuring sticks” for gene sequencing, the National Institute of Standards and Technology (NIST) can now provide laboratories with even more capability to accurately “map” DNA for genetic testing, medical diagnoses and future customized drug therapies. The new tools feature sequenced genes from individuals in two genetically diverse groups, Asians and Ashkenazic Jews; a father-mother-child trio set from Ashkenazic Jews; and four microbes commonly used in research. NIST issued the world’s first genome reference material (NIST RM 8398)—detailing the genetic makeup for a woman with European ancestry—in May 2015. Together, all five RMs serve as a collection of well-characterized, whole genome standards that can tell a laboratory how well its DNA sequencing processes are working by measuring the performance of the equipment, chemistry and data analysis involved.
  • ANSI Seeks Organizations Interested in Serving as U.S. TAG Administrator for ISO Technical Committee on Blockchain and Electronic Distributed Ledger
  • Industrial IoT leaders work towards interoperability and open source collaboration

LLVM News

  • Pairing LLVM JIT With PostgreSQL Can Speed Up Database Performance
    Using the LLVM JIT with PostgreSQL can vastly speed up the query execution performance and shows off much potential but it hasn't been mainlined yet. Dmitry Melnik presented at this month's LLVM Cauldron over speeding up the query execution performance of PostgreSQL by using LLVM. Particularly with complex queries, the CPU becomes the bottleneck for PostgreSQL rather than the disk. LLVM JIT is used for just-in-time compilation of queries.
  • LLVM Cauldron 2016 Videos, Slides Published
    The inaugural LLVM Cauldron conference happened earlier this month ahead of the GNU Tools Cauldron in Hebden Bridge, UK. All of the slides and videos from this latest LLVM conference are now available.

A quick introduction to Audacity for teachers

School's back in session, and kids love the creative arts. One of my favorite open source creative tools is Audacity, the open source audio recorder and editor. Students love manipulating digital sound with Audacity: making podcasts, learning languages, recording interviews, and recording and mixing music. I use it to record podcasts for students to provide instructions about classroom procedures and tests. Foreign language students use Audacity to record and play back their lessons. Students can download music and other types of audio tracks for sharing and re-use from Creative Commons and Wikimedia, and dub their own voices onto music tracks, the sounds of birds chirping, whales and dolphins in their natural habitats, and more. Read more