home icon contact icon rss icon

Textmode

tools I use

Mailbox sidebar for Mutt

I always found the default mailbox handling of mutt a little complicated, since it was missing an overview of folders on the main screen.

Mutt-Ng solved this by introducing a sidebar to list all your mailboxes, including a new/old mail count. However this didn’t last very long and the mutt-ng development stopped unfortunately.

I didn’t look at the possibilities regarding this issue for quite a while, since I had a mailbox status list included in my Windowmanager, however, I tried to integrate it into mutt again last week.

Fortunately the sidebar has been extracted and is now available as a patch: Mutt sidebar (folder list) patch

And for all the lazy people, there is also a debian package called mutt-patched which includes the sidebar among other useul additions.

Now I’m using the following, very nice, setup:

Selecting Text (Copy/Paste) in Elinks

Just a quick note, since I came across some articles with statements like ”... unfortunately Elinks does not support text selection, or copy and paste...” which is simply wrong.

Elinks does support text selection, you just have to press the Shift key when selecting.

Another common question is: Is it possible to select text without a mouse in elinks, using the keyboard?

The answer is, elinks does not handle that, it depends on your terminal emulator, which in most cases does not support it, afaik. You have to use the mouse (gdm if you’re not running X)

Google releases browser - Google Chrome

Two days ago google released the beta version of their very own browser, Google Chrome

Unfortunately there is only a windows version available yet.

The main features are:

  • Per-Tab Processes
  • Very fast Javascript Engine called V8 (Ruby is already running on it :)
  • A special Safe browsing mode
  • and a lot more

Since the privacy policy is quite special, there have already been some discussions and complaints.

Furthermore there are already some exploits :)

Seems as if the development of chrome will be quite interesting.

Opera 9.5 new default theme - huge bars

Just a quick post .. the lastest opera release has a new default theme which looks pretty good.

The only thing that I didn’t like is the height of the bars. After a quick modification it looks much better:

Here is the modified theme, place it into your /skin/ directory and select it.

For the curios: The font is snap from the artwiz font package

I usually only display statusbar, addressbar and tabbar as you can see, everything else is on keybindings.

NCDU - Disk usage Explorer

I think most uf us are frequently looking for a shell one-liner to list largest files on a system, either do clean up because the harddisk is to small, or just find out what’s using the most disk space.

ncdu to the rescue.

If you open up this nice tool, it recursively calculates the disk usage of a specified directory, and provides a neat interface to browse this directory.

It’s very basic, though has some useful options:

  • sort by name, size
  • delete specific files
  • percentages, graphs
  • unit powers of either 1000 or 1024

and more

The only thing I miss are VIM keybindings :)

Mibbit Webchat - Online IRC client using Ajax

Everytime I was in need for a good online irc client (webchat), the only applications I found were either Java based, very limited or not even working.

I’m glad I found Mibbit recently, which is a feature rich online irc client using Ajax.

Some features of Mibbit (some are quite funny):

  • supports all major browsers
  • full UTF-8 support
  • multiple server and query connections
  • ‘recent chat’ feature when joining a channel
  • on the fly translation :)
  • smiley fu
  • SSL support
  • per-tab input history
  • integrated pastebin
  • image url thumbnails

You can even integrate it on your own website! Pretty cool..

So give it a try :)

Filemanager and Imageviewer with Vim Keybindings

As I’m using vim all the time, and almost every app I use has vim keybindings, I’m missing two things:

  • a good Filemanager with vim keybindings
  • an image viewer with vim keybindings

Filemanager

There is a built in filebrowser (:explore), and vim plugins like VimExplorer or VimCommander

However, both are not really what I needed.

I like Midnight Commander, but the fact that you can’t configure keybindings, makes it unusable for me.

The best vim-like filemanager I found so far is definitely vifm it has really cool features and is clean and simple. That’s exactly what I was looking for – unfortunately the project seems to be inactive :(

Edit: It’s alive, yay :)

Imageviewer

I did not find a good imageviewer with vim like keybindings :(

Edit: As daftago mentioned in the comments, xzgv looks pretty good.

If anyone knows good filemanagers, imageviewers or other applications with vim keybinding support, PLEASE comment!

Edit: Check Vimperator for Opera

github.vim a vim plugin for github

Recently drnic showed me his textmate bundle for github and I was really impressed.

It let’s you do the following:

  • select some lines of code in Textmate, and open the same section (including selection hilighting) on the corresponding public github url
  • go to a specific line of code, hit a key, and get directly to the github page of that commit and file, ready to post a comment

I didn’t even know about those possibilites github offers.. and I thought, wow I need this in my editor (vim) too.

So i created a little plugin, my first vim plugin, wrapping the – fortunately very modular – scripts drnic wrote.

There are 2 branches:

  • Master – a standalone version without the github-tmbundle dependency
  • TMB – a shorter version that depends on the scripts included in github-tmbundle

Both are available on my github repository as github-vim

The latter is easier to maintain since I only have to write calls to the existing methods, so I will update it with all new features in the tmbundle as soon as possible. But I will try to keep the standalone version as current as possible.

As mentioned this is my first vim plugin, therefore any suggestions, corrections and requests are very welcome.

Ack-Grep, a grep replacement

Ack-Grep is a replacement for grep written in perl.

It’s basic usage is ack fubar, which is about the same as grep -r fubar

It’s a very fast tool since it excludes a lot of files you don’t really want to search (like repository information, temporary files, backup files etc.) And furthermore it let’s you define and specify specific filetypes.

For example, I often want to search only .dryml files (I’ll mention in a future post what this is all about). To define such a custom simple define it in your ˜/ackrc like this:


--type-set=dryml=.dryml

This enables commands like


ack --dryml fubar

searching only files ending in .dryml

Furthermore the option ack-grep -f let’s you list the files only, without actually searching them, this can be useful, although good shells provide similar functionality. It’s nice to simply use something like


ack -f --dryml

You can even print the matching parts with perls special variables like $&.

Give it a try, you will like it! Note: The Debian package name is ack-grep, not ack.

Opera Link Numbering

Since Opera doesn’t seem to support link numbering, and I wanted the same behaviour I have in Elinks – numbered links for easy keyboard navigation – I searched for it.

The only useful source was a userjs, numbered links script for Opera, but I didn’t like the behaviour. I don’t want to have to use a opera nickname for it as a shortcut, and I want to toogle it.

I’m not really familar of the userjs possibilites Opera offers, but I rewrote it quickly for my use:


// ==UserScript==

document.addEventListener("keypress",shortcut,false);

function shortcut(e){
  if(e.keyCode==78 && e.ctrlKey && e.shiftKey){ //shift ctrl n
    if (document && document.body) {
      var db = document.body;
      linksLijst = new Array();
      var links = document.getElementsByTagName("a");
      var i;
      for(i = 1; i <= links.length; i++) {
        linksLijst[i-1] = links[i-1].href;
        var linkLabel = document.createElement("span");
        linkLabel.className = "linkLijstNummer";
        linkLabel.appendChild(document.createTextNode(i));
        links[i-1].insertBefore(linkLabel, links[i-1].firstChild);
        //links[i-1].parentNode.insertBefore(linkLabel, links[i-1]);
      } 
    } 
  } 

  if (e.keyCode==79  && e.ctrlKey && e.shiftKey) { //shift ctrl o
    lnk=parseInt(prompt("Open:"));
      if (lnk > 0 && lnk <= linksLijst.length) {
        top.location.href = linksLijst[lnk-1];
      }
  } 

} 

This is quite ugly, and there are probably a ton of better ways to achieve this, but I’m too lazy for that. As you can see the keybinding is Ctrl-Shift-N to number the links and Ctrl-Shift-O to open a link.

Feel free to post your changes (eg. a binding to hide the numbers again) in the comments :)

Wmii Windowmanager

A week ago I switched from Fluxbox to the Wmii Windowmanager and I have to say it’s the best WM I ever had.

It currently looks like this:

Which looks basically like every other WM except that Wmii uses some Magic which makes it really dynamic. As you can see it is tiled and fully manageable without a mouse, but supports floating windows aswell.

The important terms Wmii consists of:

  • Clients, a single application window
  • Columns, (vertical) containing a set of clients
  • Tags, identifiers (like the tags you know form tag clouds) for clients
  • Views, a set of clients with a specific tag (like Workspaces)

The main thing thats different from the other Windowmanagers are tags. The point is that a client can have multiple tags and thus can be on multiple Views (which are basically workspaces) at the same time.

For example in the screenshot above I have views called bar and web, and I usually read my emails on bar. Sometimes I need to write about something contained on a webpage, so with Wmii I just have to give my mail window the additional tag web, and it appears on my web view too. Since it is on both views the layout on bar doesn’t change, and I can even use completely different dimensions of the same window on each view.

Another very cool thing is that each column can have one of 3 different modes to display its clients:

  • Equal size
  • Stacked, only one client fully visible, like Tabbing
  • Maximized, current client is maximized

Clients inside a column can be resized and moved between columns freely.

What makes Wmii even more dynamic is that it provides a virtual filesystem for the configuration and current state (like procfs), based on 9P. This enables you to script Wmii in almost any language.

Wmii contains an executable, wmiir, to interact with the core, and a shellscript for the basic configuration on startup.

There is also a ruby based implementation of the 9P2000 protocol, Ruby-ixp for Wmii, which is a bit faster than wmiir.

I found two Ruby projects that provide a nice interface for Wmii scripting in Ruby:

Note: The rumai page is currently in progress, and the script is about to be updated for the new Wmii release. Although ruby-wmii has a lot of features, rumai provides some additional, and really nice methods. So be sure to check out both.

Update: Since a lot of people are asking, I added my config files. Not sure if they are up to date, I changed some lines in standard-plugin, they are marked with the word CHANGE.

wmiirc-config standard-plugin