anyone perusing this site has probably noticed that I do not subscribe to social media services. No facebook, twitter, LinkedIn and the like icon reminders splashed everywhere. I don’t even have a cellphone. I am definitely out of touch.
This site does provide conventional rss and atom feeds. And at the other end of the spectrum, I occasionally can be found on Internet Relay Chat or IRC, notably the freenode for open source software communities. I seldom check Usenet news services because of the amount of noise now contained there. But IRC provides a timely way to connect with developers and to share my limited findings and knowledge.
WeeChat is the IRC client I currently use—the other was Irssi, both CLI applications run within a terminal window. Out of the box, WeeChat is extremely customizable with a large base of community supported plugins.
a basic connection to freenode, for example, can be done by issuing the commands..
/server add freenode chat.freenode.net
/set irc.server.freenode.nicks "nickname,.."
/set irc.server.freenode.username "username"
/set irc.server.freenode.realname "realname"
/set irc.server.freenode.autoconnect on
Additional connection options are described at length here. Alternatively, I connect WeeChat to the IRC network bouncer ZNC which is configured to connect to various IRC servers.
Once done, you can /join the various channels of interest.
by adding a few plugins (whose descriptions can be found on the WeeChat site)..
/script install autosort.py
/script install beep.pl
/script install buffers.pl
/script install colorize_lines.pl
/script install go.py
/script install ichatts.py
/script install iset.pl
/script install jabber.py
/script install urlserver.py
/script install vimode.py
/script install ws_replace.py
and changing a few settings, WeeChat can be colourized and extended, even providing a Vi modal operation and connection to other non-IRC messenging services.
With some keybindings to accommodate my particular keyboard layout, my Colemak Shift-DH programmed Poker 2 keyboard, I am good to navigate tiled window views..
/key bind ctrl-B /bar toggle buffers
/key bind ctrl-H /window down
/key bind ctrl-J /window left
/key bind ctrl-K /window up
/key bind ctrl-L /window right
/key bind ctrl-W /window refresh
/key bind ctrl-Z /window zoom
WeeChat provides an extensive number of keybindings and /commands for buffer navigation and /window and /layout manipulation to create tiled views, such as..
The prompt line with basic defaults typically displays user information with various command line information individually enclosed in square brackets. Note the “[I] [Search (~ str,pre|msg)]” prompt—the common user information has been removed and the added vimode script prompt has been shortened from “[INSERT]” to “[I]” as is represented with the Vim editor.
amongst the first settings I wished to change was to enhance the prompt line to include the IRC channel name (so the highlighted buffer list wouldn’t be necessary to identify which buffer is active) and use a single set of square brackets to enclose all additional information settings for a cleaner presentation..
/set weechat.bar.input.items "+buffer_short_name
[+mode_indicator+(away)+ input_search+ input_paste+ vi_buffer+]
input_text+minimal"
Note the use of the plus sign to glue the prompt items together—a comma will pad spaces between each prompt item including spaces between the square brackets themselves. “+minimal” is added to include the separator line customization described next.
weechat allows all manner of visual customizations. Horizontal (visible above) and vertical window, nickname and message, and information bar separators.
To save some space whilst providing a cleaner and more minimalistic look (IMO), this simple script draws a separator line across the remainder of input bar of unfocused windows, filling in the space normally to the right of the input prompt..
import weechat as w
def minimal_bar_item_update (data=None, signal=None, signal_data=None):
w.bar_item_update(‘minimal’)
return w.WEECHAT_RC_OK
def minimal_bar_item (data, item, window):
if not window:
window = w.current_window()
ptr_buffer = w.window_get_pointer(window, “buffer”)
if ptr_buffer == “” or ptr_buffer == w.current_buffer():
return “”
length = w.window_get_integer(window, ‘win_width’) - w.buffer_get_integer(ptr_buffer, ‘input_length’)
s = length * ‘⋅’
return s
if __name__ == "__main__":
if w.register(SCRIPT_NAME, SCRIPT_AUTHOR, SCRIPT_VERSION, SCRIPT_LICENSE, SCRIPT_DESC, “”, “”):
minimal_bar_item_update()
w.hook_signal(‘buffer_switch’, ‘minimal_bar_item_update’, ‘’)
w.bar_item_new('minimal', 'minimal_bar_item', '')
This both eliminates the need for the horizontal window separator (though, I retain it using a blank separator character to add visual vertical separation) and highlights the current buffer.
to complete my UI and colour preferences..
/set buffers.color.current_bg default
/set buffers.color.current_fg 123
/set buffers.color.default_fg 236
/set buffers.color.hotlist_message_fg 024
/set buffers.color.none_channel_fg 004
/set buffers.look.show_number off
/set weechat.bar.buffers.hidden off
/set weechat.bar.buffers.items "buffers"
/set weechat.color.chat 036
/set weechat.color.chat_delimiters 238
/set weechat.color.chat_inactive_window 240
/set weechat.color.chat_prefix_more 238
/set weechat.color.chat_prefix_suffix 196
/set weechat.color.chat_time 238
/set weechat.color.chat_time_delimiters 238
/set weechat.color.separator 030
/set weechat.color.status_name 202
/set weechat.look.buffer_notify_default message
/set weechat.look.buffer_time_format ""
/set weechat.look.color_real_white on
/set weechat.look.day_change_message_1date %a, %d %b %Y
/set weechat.look.day_change_message_2dates %a, %d %b %Y
/set weechat.look.prefix_action "▷"
/set weechat.look.prefix_align_max 15
/set weechat.look.prefix_align_min 15
/set weechat.look.prefix_align_more "…"
/set weechat.look.prefix_error "⚠ "
/set weechat.look.prefix_join "◥"
/set weechat.look.prefix_network "⚡"
/set weechat.look.prefix_quit "◣"
/set weechat.look.prefix_same_nick "⇢"
/set weechat.look.prefix_suffix " "
/set weechat.look.read_marker none
/set weechat.look.save_layout_on_exit all
/set weechat.look.separator_horizontal " "
/set weechat.look.separator_vertical " "
Blanking out the common separators and implementing dynamic separators embedded in the input prompt yields..
with a simplified but informative and condensed prompt.
Tweaking a few of the UI defaults creates a configuration that is in keeping with my distraction free minimalist aesthetic. As per usual, the dotfiles can be found here.