Back in Weechat Karmageddon, I spoke about a script I wrote to make giving hubot karma easy-peasy. In this post, we’ll talk about the rest of my weechat setup.
Weechat has two main ways to extend its stock functionality, scripts and plugins. Plugins are C programs that are dynamically loaded. Writing C programs to extend my IRC client is more work than I care for so I stick to scripts.
Since I use scripts from perl, python and ruby I make sure to install weechat with support for those languages.
$ brew install weechat —ruby —python —perl
$ brew install weechat --with-ruby --with-python --with-perl
Here’s a quick list of scripts that I use regularly:
- weechat-notification-center-rb — notifies you in Mac OS X Notification center
- weechat-nerdbot-karma — bestows karma, nerdbot style
- buffers.pl — lists your current buffers
- urlgrab.py — quickly open up links of the cat images shared by coworkers
Once weechat has started, you may type
/script help to get an interactive script manager. Unofficial scripts will not be listed in the interactive script manager so you’ll need to follow the installation instructions for weechat-notification-center-rb and weechat-nerdbot-karma.
I currently run camper_van as a proxy to my work campfire rooms, so I run
camper_van camper_van in one terminal and then I set up a custom profile with a handy shortcut and startup command in iTerm2 to start up weechat.
Here’s an example irc.conf for weechat.
I had to make a slight modification to how urlgrab worked so here’s my urlgrab.conf file. I believe it was adding quotes around %s for localcmd.
I switch buffers with
/b <buffer number. I bestow karma via
/karma <name> <amount>. And examining urls is a snap with
/url <ordinal position of url most recent first> e.g.,
/url 1 opens up the most recent url in the current buffer.
You may look forward to what I had to do to install camper_van (war story!) and another plugin to start camper_van in the background as a hook_process on weechat so there’s no need to run camper_van in its own terminal.