I’ve been looking for a command-line todo list for a few weeks now. I normally use gtodo or tasks to keep track of the things I still need to do, but was looking for a command-line application that didn’t have a lot of dependencies and that I could easily use on my older hardware. Todo.txt, beautifully simple as it is, wasn’t quite what I wanted, and neither were td, lakTEK, or iKog. Applications like calcurse, on the other hand, had what I wanted, but offered much more than I needed. I didn’t want to have to learn commands, however simple, to add tasks to the list (like most of the above require). I just wanted something that looks like gtodo or tasks — a list of todos, that is easily managed, and where you can easily mark tasks done. If it supported subtasks so much the better.

I searched and searched, but always returned home empty handed. Until, a few nights ago, I searched for “ncurses todo list” and found the lovely doneyet. This is exactly what I have been looking for. You have a simple ncurses interface in which you can create simple todo lists (more than one if you desire to keep different projects separate). You can add subtasks. You can mark tasks started (green), completed (blue) or paused (red). You can add multiple notes to tasks (the notes column is only visible if you enlarge your terminal, but notes for the selected task can be viewed when you press v). Youc an export your task list to a simple text file. You can filter your todo list to find (un)completed tasks, or you can search for a keyword.

So how do you get doneyet? Make sure you have subversion installed, and use the following command to download the source code:

svn checkout http://doneyet.googlecode.com/svn/trunk/ doneyet-read-only

To build the application, just enter the doneyet-read-only directory and type “make”. I’m not sure what the dependencies are, but I was able to compile it on two computers without installing any additional packages. The documentation doesn’t give any details.

The ‘make’ command will create an executable file called todo. Launch that, and you have your todo list. I renamed this file to doneyet, as todo is used by other applications, and copied it to /usr/bin/ so that I can launch it normally through a terminal, without having to specify the full path.

On your first run, you will be asked to create a new project.

doneyet_start

If you have already created one or more project files, you will be able to select one of the projects. (The projects files are stored in ~/.todo/)

doneyet_start_options

Once you opened a project you can start adding your tasks.

doneyet_tasks
doneyet1

The keybindings are well documented on the projects homepage:

  • A – Apply the Show All Tasks filter.
  • a – If a task is selected, add a new subtask of that task. If no task is selected add a root level task.
  • M – Show the menu bar.
    • j and k – Change menu item.
    • l and h – Change menu.
    • Return – Select the selected menu item.
    • Escape – Hide the menu bar.
  • m – Move the currently selected task. Note this doesn't work for root level tasks yet.
    • k/u/Up Arrow – Move selected task up.
    • j/d/Down Arrow – Move selected task down.
    • Return – Place task at current position.
    • Escape – Place task to where it was originally.
  • n – Add a note to the selected task.
  • v – View the notes of the selected task.
  • j – Selected next task.
  • k – Select previous task.
  • Escape – Select no task.
  • e – Edit selected task.
  • d – Delete selected task.
  • c – Toggle collapsed state of selected task.
  • R – Apply the Show Uncompleted Tasks filter.
  • C – Apply the Show Completed Tasks filter.
  • f – Apply the Find Tasks filter.
  • Space – Toggle the status of the selected item. White is unstarted, green is in progress, blue is completed and red is paused.
  • q – Quit.

Doneyet crashed on one of my computers whenever I tried to save or open project file (I haven’t yet explored why) but runs perfectly on my other computer.

I recently obtained an external USB hard disk, and have been irritated by it ever since I got it. Or rather, I’ve been irritated by the way Ubuntu Hardy interacts with the disk. Half of the time when I connected the hard disk to my computer, I would get the following error messages:

	[ 4159.607574] usb 1-1: new full speed USB device using uhci_hcd and address 4
	[ 2079.875502] usb 1-1: device descriptor read/64, error -71
	[ 2080.099379] usb 1-1: device descriptor read/64, error -71
	[ 2080.319263] usb 1-1: new full speed USB device using uhci_hcd and address 5
	[ 2080.443858] usb 1-1: device descriptor read/64, error -71
	[ 4161.322029] usb 1-1: device descriptor read/64, error -71
	[ 4161.537896] usb 1-1: new full speed USB device using uhci_hcd and address 6
	[ 4161.945615] usb 1-1: device not accepting address 6, error -71
	[ 4162.057577] usb 1-1: new full speed USB device using uhci_hcd and address 7
	[ 4162.465330] usb 1-1: device not accepting address 7, error -71

Other than this error message, the device was totally unrecognised. The USB port worked fine, and there were no problems with the hard disk, which I could use without any problems on other computers. Ubuntu’s behaviour was very unpredictable: I could detect no pattern why it sometimes recognised the disk, and why at other times it would ignore it.

An internet search indicated this is not an uncommon problem, and usbcore, which is compiled as a module in Hardy’s kernel, seems to be the culprit. Plenty of suggestions were offered online (including recompiling the kernel) but most of them did not help me at all.

Finally, I found something on an old mailing list that solved the problem. All I needed to do was add the following line to /etc/modprobe.d/options:

	options usbcore use_both_schemes=y

(If you are curious as to why this solved the problem, please read this clear explanation.)

After a reboot, my external USB drive is now recognised without any difficulties every time I plug it in.

Probably more for my own amusement (especially in a year’s time) than for anyone else’s, and in an attempt to document the evolution of my aesthetics, I here give a summary of my own 2008, in screenshots.

The wallpapers I use for my desktops generally reflect my mood, and have some special significance for me at the time. What follows is therefore not just a collection of screenshots, but a reflection of what has been on my mind the last year. Not all the screenshots I’ve taken the past year are here. I’ve left out the odd desktops (like this one or this one) that didn’t last very long.

The screenshots are arranged per computer, roughly chronologically. Yantra is my main computer, on which I do most of my work. Grantha is the computer at my office. Mitra is the old Dell Inspiron 2500 laptop I wrote about earlier.

Most of the screenshots are of Openbox, which I started using in early 2007 (if my memory serves me well…). By the end of 2007, I discovered Pekwm and used that window manager almost exclusively for a few months in the beginning of 2008. In the summer, I started experimenting with Awesome 2.3, which became the standard window manager on one of my computers (mitra), and which I use frequently on another (yantra). All of these screenshots are of Debian or Ubuntu systems. Early in 2008, grantha still ran Windows XP, but that now runs Debian Testing (lenny). One of the early mitra screenshots may be one of Arch Linux, which I had installed on that laptop for a few weeks when I just started using it.

I’ve been using the same themes on grantha and mitra for months now (see the last screenshots for both). The themes on yantra tend to change more often, though I’ve been alternating a lot the last few months between the Children of the Earth themes and the Mythos theme.

I’ve had a lot of dark desktops this year, and have used a couple of dark Gtk themes often (Royalty, Mythos and Eidolon). It really is very pleasant on the eyes, especially at night, even if not all websites go well with it.

For all of you with a slow internet connection: know that this is quite a lengthy post, with more than 40 300×225 thumbnails!

Read the rest of this entry »

Changing the size of BBdock

December 2, 2008

EDIT: It turns out that all this can be accomplished in a much easier way by launching BBdock with the command “bbdock -d 24×24″ (or width x height), as David mentions in the first comment to this post. Oh well… :-)

BBdock, one of the many useful little applications created to work with Blackbox, is a handy application launcher or dock. Though created for Blackbox and not updated in a few years, it can be used in any window manager that has a place to load dockapps, such as Openbox or Fluxbox. It is entirely configurable in a single text file (~/.bbdockrc). You can any .png file you want for the icons, and BBdock is able to raise applications you have already launched, instead of launching a new one.

The only downside to BBdock is its size. The default icon size it uses is the standard 64×64 of WindowMaker dockapps. Even if you use smaller image files, the dock itself will remain at that clunky size.

Luckily, this is not very hard to change. I prefer to have icons of 24×24, so that BBdock integrates nicely with lal, and bbpager (another one of the BBtools). Here is picture of BBdock and some other dockapps running in Openbox:

bbdock

BBdock, lal, BBpager, and docker in Openbox 3.4.7

So, how do you change the default size? You’ll need to edit the source code and then compile that, so start by downloading the source code from the BBdock website:

	wget http://bbdock.nethence.com/download/bbdock-0.2.8.tar.gz

Extract the archive, and move into the src directory of the newly extracted tarbal:

	tar xzf bbdock-0.2.8.tar.gz
	cd bbdock-0.2.8/src

Next, you’ll have to edit the Dock.hh file:

	nano Dock.hh

Search for the slotwidth( 64 ) and slotheight( 64 ) values (they should be on line 116-117), and change them to whatever size you’d prefer BBdock to use for its icons (I chose a square of 24×24):

	Settings() :
	   slotwidth( 24 ),
	   slotheight( 24 ),

Save the file and exit. Now you can compile the source code in the usual way. First install the necessary dependencies (make sure you have the source (deb-src) urls enabled in /etc/apt/sources.list!):

	sudo apt-get build-dep bbdock

Move back into the root directory of the source code, compile and install BBdock:

	cd ..
	./configure
	make
	sudo make install

(Use sudo checkinstall if you’d like to create a .deb package of the source code and install that, so that you can remove it easily later on through apt, aptitude or Synaptic)

If the installation is successful, the default icon size will be 24×24 (or whatever else you specified). Note that this size is static; even if you use smaller or bigger images, the size will remain the same.

To configure BBdock, create and edit the ~/.bbdockrc file. Each line in that file configures an icon in bbdock. You first specify the path to the icon file, followed by the command BBdock should execute when you click on the icon. If you’d like BBdock to raise applications that have already been launched instead of raising a new instance, you can specify that too. Here are some examples from my ~/.bbdockrc:

	~/.icons/bbdock/window.png:xte 'key Pause'::
	~/.icons/bbdock/text.png:mousepad::
	~/.icons/bbdock/opera.png:opera:*opera
	

The first icon uses xte to simulate a keypress of the PrintScreen key, which I have configured in Openbox’s rc.xml to launch the client-list-combined-menu which shows all running applications on all desktops. The second icon will launch a new instance of Mousepad whenever I click the icon, and the third icon will launch Opera or raise an already running instance of Opera.

Due to some rather complex circumstances, I’ve been using an old Dell Inspiron 2500 laptop as my main working computer for a few months now. I received the laptop from a friend who no longer had any need for it, but apart from a badly damaged exterior casing the laptop is fine. It is about 8 years old, and has a Pentium III processor and 128 RAM. When I received the computer, it ran Windows 98, which I replaced initially with Arch Linux and later, when I realised some odd problems were actually caused by Arch and not the computer, with a command-line install of Ubuntu Hardy (8.04).

The computer runs great now. I used sysv-rc-conf and some of K.Mandla’s speed tips to make the machine boot up faster and be more responsive. Even while running Arch, though, the computer ran rather slowly when I tried using the light(er)-weight applications with a graphical user interface I normally use. Thunar and Mousepad, my favourite graphical file manager and text editor respectively, both rather light themselves, took a long time to load or close. What to speak of heavier applications like OpenOffice, or graphical audio players! Multitasking became nearly impossible (unless I decided to make a cup of tea while I waited for another application to load!).

It was obvious that the best way to make good use of this computer was to use light command-line applications. Command-line applications are nothing new to me. I’ve been using several of them for a long time: cplay, htop (hiding the duplicate entries through F2 > Display settings > Hide userland threads), nano, rtorrent, alsamixer, and so on. But this dear Dell laptop required a more radical approach: if I was going to be productive on this computer (and I had to!), I had to minimize my use of applications with a graphical user interface and perform my main tasks from the command line. This was a lot less hard than you may think, and after a few months of working with those command-line applications on that laptop it is sometimes hard to look back. I’ve (re)discovered many great applications, and am using some of those ultra light weight applications now also on my computer at work — a strong beast that could even handle CompizFusion if I wanted it to.

Below are a few of the applications that I’ve been using over the last few months, as well as some settings I changed to make working with command-line applications easier. What follows is a record of what I’ve been doing that offers some help to you for achieving the same thing. All of it works fine on my Dell laptop running Ubuntu 8.04, but I can’t guarantee it works on every computer (or other distros). As usual, the man pages are your friend.

Window manager

Since most of my applications would be run in a terminal and I would therefore use the mouse a lot less, I wanted a window manager that could manage my terminals well and that allowed me maximum control through my keyboard, but one that also looked decently. I’ve been using the tiling window manager Awesome for a while now, and that seemed like the best option to use. Openbox ran a bit slower on that laptop, so the speed advantage Awesome gave me was also welcome. To not waste any additional resources on a session manager, I did not install any and start my window manager with startx and .xinitrc (if you have no idea how to do this, have a look at this page on the Ubuntu Wiki).

Here is a screenshot of Awesome in action with several running applications:

Awesome 2.3.4 with (clockwise) mocp, alpine and canto

Working with the consoles

Over the years, I’ve learned to work with the consoles (tty1-6, press Ctrl-Alt F1-6 to view them). Even when you use an X window manager, these consoles come in handy when you want to keep an application running even when you log out in X (and you are not using screen), or to keep something running in the background. To have six of them is a bit much for most users, though, and what is the point of keeping something running when you never use it? So I first disabled all but three of them, by editing the tty* files in /etc/event.d/. In that directory you should have 6 tty files (tty1, tty2, tty3, tty4, etc.). Open the ones you don’t want to use (in my case tty4-6) and comment all lines, so that it looks like this:

	# tty5 - getty
	#
	# This service maintains a getty on tty5 from the point the system is
	# started until it is shut down again.

	#start on runlevel 2
	#start on runlevel 3

	#stop on runlevel 0
	#stop on runlevel 1
	#stop on runlevel 4
	#stop on runlevel 5
	#stop on runlevel 6

	#respawn
	#exec /sbin/getty 38400 tty5

When you reboot, you should only have access to the getty consoles you did not disable. Your X-server should load on the next available console (Ctrl-Alt-F4 in my case). You will not notice a big improvement in speed or responsiveness (at least I didn’t), but it feels good to me to not load anything that I won’t use anyway.

Ubuntu is not very good in choosing the best VGA resolution for my consoles (Arch is much better in that!). How do you change it and make those big ugly fonts a little smaller? First of all, you need to find your best VGA resolution, for example here. Then edit your grub menu file (nano -B /boot/grub/menu.lst) and specify what vga resolution should be applied at the end of your kernel line. It should look something like this (Don’t copy and past this! I’ve cut out part of the kernel line so it would all be visible here):

	title		Ubuntu 8.04, kernel 2.6.24-18-generic
	root		(hd0,0)
	kernel		/boot/vmlinuz [...] ro quiet vga=792
	initrd		/boot/initrd.img-2.6.24-18-generic

Now, how do you change the font? In Ubuntu, you can do this in two ways. If you just want to change the console font temporarily, you can do so with a command like this:

	consolechars -f Lat2-Terminus16.psf

This will set the console font to Lat2-Terminus, size 16. The font types and sizes you can use are limited, however. You need to look in /usr/share/consolefonts/ to see what fonts you have available. If you need a different encoding or are looking for a different font style, there are several console font packages in the Ubuntu repositories that you can install (do a search for “console fonts” in apt or Synaptic). For more information on consolechars, see the man page (man consolechars).

This first method is useful if you want to see what a font looks like on the console without having to reboot. Once you’ve decided on a font and size you want to use, you’ll probably want to make the changes permanent. To do so, edit the /etc/default/console-setup file and edit it accordingly. The lines you are especially interested in are the following:

	CODESET="Lat15"
	FONTFACE="VGA"
	FONTSIZE="14"

This sets the VGA font, in the Lat15 encoding, with size 14. Note that you can only specify fonts here that you have installed in /usr/share/consolefonts/. The example I give here points to the Lat15-VGA14.psf.gz package in that directory.

Reboot your system, and you should have a nicer resolution and nicer fonts on the console (note the font is only applied later in the boot sequence).

Window managers for the console?

While the tty consoles are useful, if you plan to use them extensively you’ll need a “window manager” for the console, so you can have more than one application running in each console. There are several available.

GNU Screen is probably the most popular one, and it is easy to see why. It is very versatile and offers you a lot of control. You can detach ‘windows’ and reattach them later, exiting screen does not terminate processes launched in screen, it has a handy status bar that you can customize to your liking, etc. The Screen homepage will probably not make you much wiser, but there is plenty of good documentation available on the internet to get you started (see for example here or (more elaborately) here).

My current favourite, however is dvtm, the “dynamic virtual terminal manager”, a tiling window manager for the console inspired by dwm. You can switch between different modes (maximized, vertical tiling, bottom tiling, or grid)and you (in true dwm spirit) can change the default configuration if you desire by editing the source code (which isn’t as hard as it sounds) and recompiling dvtm. The documentation found on the project’s home page should be good enough to get you started with dvtm.

Terminal emulator

When running command-line applications in X, you’ll need a terminal emulator. I’ve always liked the ease of xfce4-terminal, but that was a bit too sluggish on this computer. I wanted a light terminal that allowed tabbing, and finally returned to urxvt (rxvt-unicode), a terminal I had used in the past but had never given enough time.

Urxvt is a nifty terminal. It is light, but very feature rich: read the very long man page to see its potential. It can tint unfocussed terminals (very handy in a tiling window manager!), it supports tabs, its behaviour colours are easily configurable through your ~/.Xdefaults file, and it supports transparency if that is your thing.

Here is the relevant portion of my .Xdefaults file:

	###############
	###  urxvt  ###
	###############
	URxvt*font:		xft:DejaVu Sans Mono:size=7:VL Gothic:antialias=true:hinting=true
	URxvt*boldFont: 	xft:DejaVu Sans Mono:size=7:antialias=true:hinting=true:style=bold
	URxvt*background:	#08090A
	URxvt*foreground:	#4b555e
	URxvt*color0:		#08090A
	URxvt*color1:		#4b555e
	URxvt*color2:		#8fa1b2
	URxvt*color3:		#4b555e
	URxvt*fading:    	10
	URxvt*tintColor: 	#FCFCFC
	URxvt*shading:    	100
	URxvt*inheritPixmap: 	False
	URxvt*cursorBlink:      False
	URxvt*cutchars:		`'",;@&*=|?()[]{}

	URxvt*scrollstyle:	plain
	URxvt*mouseWheelScrollPage:	False
	URxvt*jumpScroll:       False
	URxvt*skipScroll:       False
	URxvt*scrollBar: 	False
	URxvt*scrollTtyOutput:	False
	URxvt*secondaryScroll:	False

	URxvt.perl-ext-common:	default,tabbed
	URxvt.tabbed.tabbar-fg:         1
	URxvt.tabbed.tabbar-bg:         0
	URxvt.tabbed.tab-fg:            0
	URxvt.tabbed.tab-bg:            1

	URxvt*urlLauncher:	opera
	URxvt*saveLines::       32767

To enable tabs, you need the URxvt.perl-ext-common: default,tabbed line. The URxvt.tabbed.tab(bar)-fg/bg lines specify what colours the fore- and background of the tabs and tabbar will be; the numbers given here (in this case 1 and 0) refer to the colour numbers specified earlier (URxvt*color0, etc.). To open a new tab, press Shift+Down, to switch between tabs press Shift+Left/Right.

Shell

I’ve been tempted to try zsh as an alternative to bash ever since reading this post a few months ago. Though I’ve been told in several places that zsh is slower than bash, my experience is the opposite. Bash was very slow in starting on this laptop, which lead me to try out a different shell. Zsh, on the other hand, is fast and snappy: it loads almost immediately when a terminal is launched.

Zsh is a great shell, and one that is easy to transition to as you can use most of your bash aliases in zsh. But zsh offers so much more than bash: its autocompletion is miles better than bash’s (it has menus!), it can autocorrect spelling mistakes, you can share history across sessions, and much more. I admit that I don’t use many of the great features that zsh has, but its autocompletion, autocorrection and better history management are reasons enough to stick with it. Adjusting to zsh has, so far, been very easy. In my daily usage of the shell, I have everything I liked about bash and a few more things. The main difficulty has been configuring zsh, but for that there is plenty of good information available online. It is probably best to find someone else’s zshrc file and modify that to your liking. My configuration file is here.

Zsh is in the repositories, so you can easily install it through aptitude (sudo aptitude install zsh). To make it your default shell and replace bash, use the following command:

	chsh -s /bin/zsh USERNAME

This will make zsh the default shell for the username you specify. You’ll need to log out and back in to apply the changes.

Zsh has a lot of great features that make working on the command-line so much easier. You can find great tips online (see here and here for example), so there is no need for me to repeat that here.

File manager

As I mentioned earlier, my beloved Thunar was a bit too big for my new old Dell laptop, and it took me a while to let go of it. But with every 12 seconds (average) it took to launch Thunar, my detachment increased, and after a week or so I resolved to look for a lighter, command-line file manager. That search was over really quickly! I briefly experimented with clex and fdclone (as well as some of the ugly graphical file managers such as Gentoo), but it became very quickly apparent that there is no better command-line file manager than Midnight Commander (mc).

Midnight Commander running in urxvt

Midnight Commander is a very powerful dual-paned file manager. It has something of a learning curve (don’t all good applications), especially if you are used to point-and-click graphical file managers, but once you know your way around it, you’ll be glad you invested the time and energy. If run in X, you can use your mouse with MC, but you’ll only see the real potential of this file manager when you learn to control it from the keyboard. This manual and this article helped me enormously in familiarizing myself with MC, and I created a much used little ‘cheat sheet’ for myself with the most commonly used keybindings to help me learn them.

MC is themeable; you can change the colours of every aspect through the ~/.mc/ini file (if you don’t have one, run MC and in the Option menu select “Save Settings”). Note that you need to edit this file while MC is not running; MC writes to this file when it exits, thus disabling anything you’ve changed while MC was running. At the bottom of that file, you can specify the colour settings MC should use. Have a look at my configuration file to figure out how to do this. The possible colours are limited: black, red, green, brightgreen, brown, yellow, blue, brightblue, magenta, brightmagenta, cyan, brightcyan, lightgray and white.

If you want to properly view .odt, .pdf, or .doc files in MC with the F3 View command, you should install several other applications that MC can use:

	sudo aptitude install antiword poppler-utils o3read

Once I realised how much faster Midnight Commander copies files than any graphical file manager I’ve used, I started using MC also at work, alongside my much beloved Thunar.

Text editor

My default text editor is nano at the moment. It is nice and simple and is good enough for most of the simple editing I do at the moment. That it shares many keybindings with alpine, my email client, is a handy benefit.

Unfortunately, nano is not the best tool to edit complex text files. Since I spend most of my time on the computer writing, I need something with a little more bling. So far I’ve been using OpenOffice (Abiword just isn’t good enough) and Gedit with the Latex plugin, but I’ve also started to experiment with Vim and Vim-Latex.

Though Vim has a reputation of being an editor with a steep learning curve, I haven’t had much difficulty with it so far. On the contrary, I’ve found it to be rather easy to learn. Vim comes with a great tutorial, called vimtutor, that helps you to learn Vim not by cramming keybindings and commands, but by working with those commands. The tutorial lasts about half and hour (depending on how much time you take for it), and after that you should be familiar with all the basics. There are also several good tutorials online (here and here for example) when you require more than vimtutor covers.

Audio player

There is no lack of command-line audio players, and many of them are well known. If you are looking for an audio player that fetches album art, lets you browse Wikipedia, burns tracks to CD, and waters your plants while you are away, the command-line audio players will be a big disappointment to you. But if you are looking for something that plays your audio files without consuming most of your computer’s resources, you’ll have plenty to choose from.

Even before I started working on this laptop, I was using Cplay to play my audio files. Cplay is light, has a clean interface and is very straightforward in its use, and if you’re still unsure how to use it, K.Mandla has a great guide for you. Cplay is really a front-end to other audio players, which you also need to install. I recommend you use mpg123 (and mpg123-alsa so it doesn’t interfere with other applications that use alsa) rather than mpg321 to play mp3 files; on all the computers I have tried this, mpg123 uses almost 20% less cpu than mpg321.

The only downside to cplay is that it doesn’t allow you to control it with commands. To pause or skip to the next track, you need to do so within cplay. I like to keep my audio player in the background, however, and pause it with a global keybinding (Ctrl+Alt+Space) from wherever I am working. I normally use mpd and a front-end for this, but am too lazy to set up a database and constantly update the database whenever I add some music.

I am currently flipping back and forth between cplay and Music On Console (mocp). Mocp uses a little more resources than cplay, but not enough to make a big difference. It has a simple, clean interface the way I like it, and you can easily control it with special commands (mocp -G to toggle play/pause, mocp -f to move to the next track, etc.). Mocp can keep running, as a daemon, after you close it too if you like that.

Movie player

It makes a lot of sense, but before I started using this laptop, I had no idea how much resources are needed to play a video file or a DVD. VLC, Totem and (G)xine made it nearly impossible to have some other resource intensive application running at the same time.

Luckily there is MPlayer. And I don’t mean a graphical front-end for mplayer (such as KMPlayer, SMPlayer or Gnome-mplayer), which seemed as hungry as the other video players with a graphical front-end, but the mplayer base you can use with the command mplayer filename.avi. Playing a video file with mplayer on that laptop uses less than a third of the resources any of the graphical players use!

Mplayer, without a graphical front-end, offers a host of additional features many of the graphical clients lack. Since there is no graphical interface, you need to navigate and play the video file with your keyboard. The right and left arrows forward and rewind 10 seconds, up and down forward and rewind 1 minute, pageup and pagedown forward and rewind 10 minutes, p pauses or unpauses the video, etc. You can adjust the play speed (with the [ and ] keys), and — one of the greatest features — adjust the audio delay with the + and – keys.

Email client

In my undergraduate days, before I had a computer I used the computer of my room mate, which ran a version of Suse (if I remember correctly). According to him there was only one good email client and that was pine, so I was forced to use that to handle my emails. After an initial period of frustration, I got used to the interface and the keybindings and liked the simplicity of it. However, when I got my first computer (running Windows), I replaced pine with Netscape and later Opera, which I still use this day for email.

Pine has since been transformed into Alpine, which is now once more my email client. It’s interface is simple, as are its keybindings, and it is a lot easier to set up or work with than mutt.

I use Gmail, and am able to access my Gmail with IMAP through Alpine. This guide was helpful to set it up, and this guide told me how to get Gmail labels to appear as folders in Alpine.

If you’d like a spell checker in Alpine, you can install Aspell (with the dictionary files of your language) and set the speller= option in ~/.pinerc to speller=aspell –mode=email check. Ctrl+T will then launch the spell checker.

RSS reader

I’ve finally decided an RSS reader is useful. I never really saw the need to use one until I started using this laptop, and realised that most browsers are resource intensive and that I could minimize their use by using an RSS reader to read most of the blogs and news-sites I normally frequent. It took me a while to find something I liked, though.

Raggle is recommended again and again, but I found it clunky. The interface is too complicated for me (I don’t need to see three different windows at the same time), and it used quite some resources on this computer. Snownews had a great clean interface, but only showed the first few sentences of each news item, which defeats the purpose of an RSS reader for me. Newsbeuter was a good alternative, but ultimately Canto, a new feed reader won my heart.

Canto was born out of NRSS and has everything I like. It is light, has a sober interface (I really don’t need to see all the links within blog posts), it has customizable keybindings, and it is simple to use and setup. The documentation on the website is great, and the IRC channel is very friendly and helpful.

If you run Canto on Ubuntu, you may want to install Debian’s python-feedparser package, as the Ubuntu version still has a bug that doesn’t go well with WordPress feeds (instead of the post titles, you’ll see the author’s name).

Web browser

I’ll be honest. Command-line browsers are not really my thing. I occasionally use Elinks, but it most websites are not made for text browsers, and text browsers easily irritate me.

After experimenting with the graphical browsers on this laptop — Epiphany (reasonable, but still a little slow), Kazehakase (which crashed a bit too often), Dillo (nice and fast, but a little too simple), Firefox (too heavy for this laptop) — I returned to the best browser on earth: Opera.

Opera is the fastest and lightest graphical browser I used on this laptop (not considering Dillo). I first went through this list and turned of everything I don’t use, and installed the new Flash 10, which is a lot lighter than version 9.

With all these command-line applications I rarely need to use the mouse, so I was glad to found out “Vimperator for Opera”. It isn’t as polished as the standard Firefox Vimperator plugin, but after modifying the Vimperator keyboard layout for Opera, I now have a browser that I can control entirely from the keyboard. The only weakness is the poor implementation of one of Vimperator’s greatest features: the hint mode, which helps you to navigate links. Unfortunately, you need Javascript on for it to work (I normally turn it off), and you can only open links in new tabs. I therefore haven’t given up on my mouse just yet, but at least I can minimize its use enormously.

~ ~ ~

After a little experimenting and exploration I now have a fully functional computer, than runs fast and can do a lot more than people expect. I pains me to see people throw away computers with similar specs (or even better!) that are still fully functional, but are ’slow’ compared to the new computers that are produced today. If this computer was good enough for general use 8 years ago, why would it not be good enough for general use today? People sometimes laugh when they see my battered old laptop case, but are impressed by the speed and power of the applications that I run on it.

Here is a question to all of my kind hearted readers with some knowledge of programming. :-)

I’m one of those users that loves the dock in Openbox. For nearly as long as I’ve been using Openbox (once I figured out what it really was), I’ve used it to load the few things I normally required from a panel: a clock (initially bbtime and later lal) and a system tray/notification area (always the simple docker). Later I added bbpager to it, and now, inspired by mulberry, created a little dock by combining all the above with bbdock (modified so its default icons are 24×24 in size, rather than the standard 64×64). Here is what it looks like:

bbdock, lal, bbpager and docker

I’d like to do more with the dock, though. Unfortunately, most dockapps are either too big (the standard 64X64 Window Maker squares) or aesthetically not very pleasing, or both. The BB-tools, created to be used with Blackbox, are much nicer and smaller, but rather limited and no longer developed (apart from bbpager, it seems).

For a little while now, I’ve been trying to get more things to display in my dock. I’d like to be able to show my reminders in it (using remind), and possibly even things like current cpu/memory usage (in a more attractive way than the existing dockapps). The things I normally use conky or dzen2 for, in other words.

Wouldn’t it be great if you could load conky into the dock? Or even better, wouldn’t it be great if you could load dzen2 into the dock?

Awesome is able to do something like this, by creating widgets with dzen2 and loading them into the statusbar — though this seems a little less complicated than it would be in Openbox (you can’t autohide or move the widgets around like you can in Openbox’ dock).

I don’t know exactly how something similar would be accomplished in Openbox, or even if it could. Perhaps the dzen2 code could be modified so as to give it the window properties of a dockapp, or perhaps this would be done through a third party application that loads into the dock and into which dzen2 loads, perhaps Openbox itself would need to be modified.

I am no programmer — I know just enough bash to get me around and can only make some very simple modifications to existing code, often through trial and much error, and that is about it. But if you are a competent programmer, you share my enthusiasm for this and are willing to invest some time into it, please do! You’d make this happy Openbox user, and perhaps countless others, even happier. And you might even become famous. ;-)

Tint2

July 23, 2008

Some of you may use, have used or know of tint task manager (ttm), a simple light weight task list with a pleasant and configurable aesthetic. The project showed very little progress, until someone else (?) decided to hack on the code and come up with an improved version of the task list: tint2.

The improved version added extra configuration abilities as well as drag/drop support, but is clearly intended to be more than just a task list. The latest release, 0.6, added among other things a configurable clock, and launchers seem to be planned. Like some panels, Tint now also automatically sets a margin for it so that other windows cannot overlap it and the task list always remains visible (unfortunately, you can’t make this optional, as far as I can tell, so I cannot use 0.6 for my tabbed desktop effect…)

To install it on Ubuntu Hardy, you’ll need to install the following dependencies: libcairo2-dev libpango1.0-dev libglib2.0-dev libimlib2-dev libxinerama-dev

The configuration file is still fairly straightforward, but contains a lot of extra features over ttm. If you get lost in all the settings, you’ll be happy to know that a manual with pictures (in pdf format) is available on the tint2’s website.

If you like minimalistic configurable panels this is a project to keep an eye on. If they add a system tray and launchers, I’m sure many users will replace pypanel with tint2.

My Openbox keybindings

July 22, 2008

One of Openbox’ great strengths is that you can control every aspect of the window manager with your keyboard, provided you spend some time configuring your keybindings. Since I use my computer extensively to process text, I have configured Openbox such that I only need to use the mouse when I really want to, and don’t have to move away from the keyboard. It speeds things up considerably, once you are used to it!

Below I give all the keybindings I use in Openbox. Some of these keybindings I don’t use very regularly. The ones that I use extensively are those that launch applications (Win+F1-9 to launch applications, or Alt+F1-6 to launch menus or application launchers); those that control the volume (Ctrl-Up/Down) and mpc (Ctrl-Alt + other keys); those to switch windows (Alt-Tab and Win-Tab) or to switch workspace (Ctrl-Alt-Left/Right); those for basic window actions, such as close (Win-A-C), maximize (Win-A-M), iconify (Win-A-I), send to bottom (Win-A-B), etc; those to move windows in the current workspace (Win + some direction key); to move windows to the next workspace (Win-A-N) or previous workspace (Win-A-P); or to follow windows to the next (Win-A-Shift-N) or previous workspace (Win-A-Shift-P).

When I mention “(with osdsh)”, it means that the action that is performed is shown on screen with osdsh. Thus, when I reconfigure Openbox, the message “reconfiguring” on my screen, or when I turn the volume up it says “volume up”. (I know osdsh has a mixer display, but that uses a lot of CPU in Hardy!). When I mention “(with script)” in the launcher section, I launch a script to raise the application if it is already running or to open a new instance if it isn’t. The shutdown and logout keybindings (Win-O-S and Win-O-E) launch a gmessage script that gives me the option to reboot, shutdown, logout, or lock the screen.

As you will see below, I make extensive use of keychains. Keychains are great! They enable me to keep most of my keybindings fairly simple and straightforward: Win-A starts the keychain for window actions (thus ‘Win-A + C’ closes the focused window, and ‘Win-A + N moves it to the next workspace); Win-O governs all the Openbox related actions (Reconfiguring, editing the configuration files, etc.).

I have also posted my current rc.xml file, for those interested. I’m pretty sure there are some additional keybindings in that file (probably duplicate actions) that are not mentioned below; if that is the case they are keybindings I no longer use, but forgot to remove.

		#########################
		## Launchers and Menus ##
		#########################
		Alt F1		root menu
		Alt F2		gmrun
		Alt F3		dmenu
		Alt F5		dmenu for configuration files
		Alt F6		client-combined-list

		Win F1		mousepad
		Win F2		notecase
		Win F3		xfce4-terminal (script)
		Win F4		thunar (script)
		Win F5		gmpc
		Win F6		epiphany
		Win F7		ooffice writer
		Win F8		opera (script)
		Win F9		stardict
		Win F10		gedit
		Win F11		gnome-alsamixer
		Win F12		Lock screen (xlock)

		Ctrl Alt Del	htop

		#########
		## MPD ##
		#########
		Ctrl Alt space	mpc toggle (with osdsh)
		Ctlr Alt Prior	mpc next (with osdsh)
		Ctlr Alt Next	mpc previous (with osdsh)

		####################
		## Volume control ##
		####################
		Ctrl Up		Volume up (PMC) (with osdsh)
		Ctrl Down	Volume down (PMC) (with osdsh)
		Ctrl Shift Up	Volume up (Master) (with osdsh)
		Ctrl Shift Down	Volume down (Master) (with osdsh)
		Ctrl Alt End	Volume mute (with osdsh)

		####################
		## Window actions ##
		####################
		Win a		Window actions
			m	Toggle maximize full
			v	Toggle maximize vertical
			h	Toggle maximize horizontal
			i	Iconify
			c	Close
			s	Toggle Shade
			t	Toggle always on top
			b	Send to bottom
			Shift b	Toggle always below
			Shift l	Send to normal layer
			Shift d	Toggle omnipresent
			d	Toggle decorations
			l	Lower, focus to bottom, unfocus
			p	Send to previous workspace
			n	Send to next workspace
			Shift p	Follow to previous workspace
			Shift n	Follow to next workspace

			g	GrowTo
				Left	GrowToEdgeWest
				Right	GrowToEdgeEast
				Down	GrowToEdgeSouth
				Up	GrowToEdgeNorth

		Win space	Show client-menu

		#############
		## Openbox ##
		#############
		Win o		Openbox actions
			r	Reconfigure (with osdsh)
			c	Edit rc.xml
			m	Edit menu.xml
			s	Shutdown (gmessage)
			e	Exit/logout (gmessage)
			l	Lock screen (xlock)

		###############
		## Worspaces ##
		###############
		Ctrl Alt Left	Go to the workspace on the left
		Ctrl Alt Right	Go to the workspace on the right
		Alt Shift Left	Send window to the workspace on the left
		Alt Shift Right	Send window to the workspace on the right

		Win Shift F1	Send window to workspace 1
		Win Shift F2	Send window to workspace 2
		Win Shift F3	Send window to workspace 3

		Win d		Show desktop

		######################
		## Window switching ##
		######################
		Alt Tab		Next window
		Alt Shift Tab	Previous window
		Win Tab		Next window (all desktops)
		Win Shift Tab	Previous window (all desktops)

		##################
		## Move Windows ##
		##################
		Win Left	Move window left
		Win Right	Move window right
		Win Down	Move window down
		Win Up		Move window up

		Win Prior	Move window to top right corner
		Win Next	Move window to bottom right corner
		Win Home	Move window to top left corner
		Win End		Move window to bottom left corner

		####################
		## Resize Windows ##
		####################
		Alt Left	Increase left edge
		Alt Right	Increase right edge
		Alt Up		Increase top edge
		Alt Down	Increase bottom edge

		Alt Shift Left	Decrease right edge
		Alt Shift Right	Decrease left edge
		Alt Shift  Up	Decrease bottom edge
		Alt Shift Down	Decrease top edge

		Alt F12		Toggle fullscreen

		Ctrl Alt d	Toggle autohide dock
		

A “tabbed” desktop

July 21, 2008

K.Mandla has already written about my “tabbed desktop”. Here is a little more information:

To create the effect of a ‘tabbed’ desktop, I have been running tint2 at the top of my screen, covering the window decorations. With the right colour and size settings, you can easily create the appearance of a tabbed desktop.

Hayagriva and my “tabbed” desktop

Two things make this method somewhat practical: First of all, I run most of my applications maximized; smaller, ‘floating’ windows somewhat destroy the tabbed feel of the desktop. Secondly, since tint covers the window decorations and makes it thus unable to close, iconify or shade the window, make it sticky, or send it to another desktop, you should be able to perform these actions with the keyboard, through keybindings.

Since K.Mandla’s post, I’ve made a small adjustment to the desktop: I added a clock and remind to my top task bar, using dzen2 (I initially also had a volume bar in it, but dropped that). My dmenu scripts also load in that exact area, using the same colour settings and covering both tint and dzen.

If you’re interested, this is my dzen2 script, and this is my tintrc. The Openbox and Gtk theme I use is Bygone (somewhat modified).

I’m not entirely sure why you’d want to use this, but it does get asked from time to time: How can you use a different Gtk theme, icon theme and/or fonts for specific Gtk applications?

If you just want to change the Gtk theme, you can launch your application with the following command:

	GTK2_RC_FILES=/path/to/your/theme/gtkrc application-command

Thus “GTK2_RC_FILES=/home/urukrama/.themes/royalty/gtkr-2.0/gtkrc thunar” will use the Royalty theme for Thunar. Note that this will use the default font and icon theme, not the icon theme or font you specified in your ~/.gtkrc-2.0 or ~/.gtkrc.mine file.

If you’d also like to set a custom icon theme and font for the application, create an empty file, wherever you find convenient (for example in /home/USERNAME/.themes) and call it whatever you want (for example, custom.gtkrc). Then add the following to that file:

		#To set the Gtk theme
		include "/path/to/your/theme/gtkrc"

		#To set the icon theme
		gtk-icon-theme-name = "GnomeCorsair"

		#To set the font
		style "Sans"
		{
		font_name = "Sans 8"
		}
		widget_class "*" style "Sans"
		gtk-font-name = "Sans 8"

Change ‘GnomeCorsair’ to the icon theme you’d like to use, and “Sans” to the font you prefer. The /path/to/your/theme/gtkrc is what it says (for example /home/urukrama/.themes/royalty/gtkr-2.0/gtkrc). If you would only like to have a custom icon theme or font, only specify those and leave the rest out.

To launch Thunar with these settings, use the following command (If you saved the file elsewhere, adjust the path accordingly):

	GTK2_RC_FILES=/home/USERNAME/.themes/custom.gtkrc thunar

If you want to use this in a launcher such as Openbox’ menu, rather than the terminal, try the following:

	bash -c 'GTK2_RC_FILES=/path/to/your/gtkrc application-command'

I haven’t managed to get this working with either the gnome-settings-daemon or the xfce-mcs-manager running. It seems they override this.

As proof that this works, here is a screenshot of two instances of Mousepad running, one using the default theme, the other launched with a custom gtkrc: