By Dmitri Popov
Gnome and KDE sport rich, graphical desktop environments, but you can still appreciate a few command-line productivity tools. Take, for example, command-line task managers. They are usually blazingly fast and light on resources, and you can use them without lifting your hands from the keyboard.
More importantly, the lack of visual embellishments lets you focus on what is important - that is, keeping tabs on your task lists and to-do lists with maximum efficiency and minimum distraction.
Other advantages to using a command-line task manager present themselves. For example, you can easily and securely access it from a remote machine via SSH. That means you can run the task manager on your home server and access it from any machine using SSH. You can even access and manage tasks from your Android device, courtesy of the ConnectBot app [1].
A command-line tool can be integrated easily with the Conky monitoring utility, so you can get a quick overview of your tasks from the convenience of your desktop. Although quite a few command-line task managers are available, in this article, I'll take a closer look at iKog and Taskwarrior.
iKog [2] is a great solution if you are looking for a single-file portable application that can run on different platforms. iKog is written in Python, so it will run on most Linux distributions right out of the box (see Figure 1). Because iKog consists of a single ikog.py
file, you can copy it to a USB stick and use it on any Linux machine.
Also, because iKog consists of a single file, there is nothing to install and configure. Download the latest ikog.tar.gz
or ikog.zip
archive, unpack it, and make it executable with the chmod +x ikog.py
command in the terminal. Then, you can start iKog by running the command ./ikog.py
.
Adding a new task in iKog couldn't be easier: Entering the name of the task preceded by a +
and space, then pressing Enter
+ Water flowers
adds the task using the default priority, context, and date. Of course, you can specify these values when adding a task. For example, you can assign the task a priority from 1
to 10
(where 10
is the highest priority level):
+ Feed birds #7
In a similar manner, you can specify a due date for the task:
+ Buy bird seeds d:2010-09-01
Note that iKog uses the ISO data format, so the task above is scheduled for September 1, 2010. Because iKog is loosely based on the Getting Things Done (GTD) methodology, it allows you to assign a context to a task. For example, you can assign a @Garden
context to all your gardening chores:
+ Water flowers @Garden + Feed birds @Garden
iKog makes it even easier to assign a context by specifying abbreviations. For example, instead of typing @garden
every time you add a garden-related task, you can specify an abbreviation:
ABBREV @grd @Garden
iKog comes with a few default abbreviations, which you can view by using the ABBREV ?
command.
The task manager also lets you group tasks by project, which can come in handy when managing complex projects. For example, if you plan on building a birdhouse, you might want to divide it into several manageable tasks and assign them to the Birdhouse project:
+ Buy materials :pBirdhouse + Find blueprints :pBirdhouse + Build bird house :pBirdhouse
Note that the name of the project must be preceded by :p
. Of course, you can combine all the described values when adding a task:
+ Install bird house @grd :pBirdhouse #9 :d2010-09-03
Besides tasks, iKog can also handle notes. Using the NOTE
command, you can add tasks with a priority of 0
and a context of @Notes
. This approach can be useful for storing small text snippets. Additionally, iKog allows you to encrypt and hide confidential information in both notes and tasks. To encrypt a part of the text in the note or task, use the <private>
tag as follows:
note My secret password is <private> monkey
iKog then prompts you to specify a master password and encrypts the text after the <private>
tag. To view the encrypted text, enter the SHOW
(or SH
) command followed by the task or note number. Then type the password, and iKog will display the decrypted text. Although iKog doesn't have formatting features, it lets you embed line breaks in your tasks and notes with the <BR>
marker.
Managing existing tasks in iKog is rather straightforward. To view a list of all tasks in iKog, use the LIST
command. You can use the NEXT
and PREV
(or N
and P
) commands to navigate between the tasks. To go to the next task in the list, simply press Enter. The TOP
(T
) command allows you to jump to the top of the task list, whereas the GO
(G
) command can be used to go to a specific task - for example, GO 7
. To view all the tasks in the @Garden
context, use the LIST @Garden
command. Similarly, you can list all the tasks in a particular project; for example, LIST :pBirdhouse
.
iKog can also output the task list as a nicely formatted HTML file, which can come in handy when you need to publish your tasks quickly on the web or print them. iKog uses the ikog.css
stylesheet to format the output, so you need to download it from the project's website and drop the file in the same directory as the ikog.py
script. Then issue the LIST>
command, and iKog generates an HTML file and opens it in the default browser (Figure 2).
To rearrange the tasks, you can use the FIRST
(F
), UP
(U
), and DOWN
(D
) commands. To move the desired task in the list, use the appropriate command followed by the task's number. The KILL
(K
) command followed by the task's number lets you delete any task. And if you want to delete all the tasks in iKog in one fell swoop, you can use the CLEAR
command. Instead of deleting a task, you can also archive it with the ARCHIVE
command. This command removes the specified task from the list and saves the task in the ikog.py.archived.dat
file. iKog also sports commands that let you modify (MOD
), replace (REP
), and substitute (SUB
) the tasks.
To save your tasks as a plaintext file, use the EXPORT
command, and to get the data back into iKog, use the IMPORT
command. In combination, these two commands can act as a simple backup solution for your data. Finally, when you are done using iKog, issue the QUIT
command to exit the application.
Taskwarrior [3] is another powerful yet easy-to-use command-line task manager. You can download binary packages of Taskwarrior for popular Linux distributions from the project's website. Ubuntu users can either grab and install the .deb
package, or they can add a PPA repository and install Taskwarrior with the following commands:
sudo add-apt-repository ppa:ultrafredde/ppa sudo apt-get update sudo apt-get install task
Once Taskwarrior has been installed, run the task
command in the terminal and enter yes
when the application prompts you to create a configuration file. Although you can start using Taskwarrior right away, you might want to tweak the default settings stored in the .taskrc
file (Figure 3). By default, Taskwarrior uses the American date format, which you can change by editing the dateformat=m/d/Y
line - for example, dateformat=Y/m/d
. If your week starts on Monday, modify weekstart=Sunday
accordingly. Tweak other settings, if needed.
As you would expect, populating Taskwarrior with tasks is as easy as submitting task add
followed by the task's description (Listing 1A). Like iKog, Taskwarrior lets you prioritize tasks with H
(high), M
(medium), and L
(low) priorities, or you can prioritize an existing task by specifying its ID (Listing 1B). Taskwarrior also supports projects, which comes in handy for grouping tasks (Listing 1C). Besides the projects, Taskwarrior allows you to assign multiple tags to each task (Listing 1D). Also, any task manager worth its salt lets you assign due dates to tasks and handles recurring tasks (Listing 1E).
Listing 1: Taskwarrior Commands |
A. Populating Taskwarrior task add Water flowers B. Assigning Priorities task add Water flowers priority:H task 1 priority:H C. Grouping Tasks task add Feed birds priority:H project:Garden D. Assigning Multiple Tags task add Shave sheep +sheep +chores +shaving E. Assigning Deadlines task add Buy fertilizer due:17/9/2010 task add Buy fertilizer due:wednesday recur:monthly |
The task ls
command provides a concise list of tasks, whereas the task list
command provides a more detailed overview of the existing tasks. Additionally, the task long
command generates a comprehensive overview of all tasks. To view a list of all projects, use the task projects
command, and if you want to view all tasks in a specific project (e.g., Garden
), you can do so with the task list project:Garden
command. The task summary
command returns a list of projects and a summary of their task status. Finally, you can mark a task as completed with task id done
or delete the task altogether with task id delete
.
Despite being command-line tools, both iKog and Taskwarrior are every bit as powerful as their GUI-based alternatives. Learning all the commands and features of each tool might take some time, but once you've mastered them, you'll never look back at the graphical interface.
INFO |
[1] ConnectBot: http://code.google.com/p/connectbot
[2] iKog: http://www.henspace.co.uk/ikog/index.html [3] Taskwarrior: http://taskwarrior.org |
THE AUTHOR |
Dmitri Popov holds a degree in Russian language and computer linguistics. He has been writing exclusively about Linux and open source software for several years, and his articles have appeared in Danish, British, North American, German, and Russian magazines and websites. |