A command-line task manager
In Context
Tasks have a tendency to accumulate over time resulting in unwieldy to-do lists. To filter out unwanted tasks, you can use the context
command to specify the filtering criteria (Listing 7).
Listing 7
Context
$ dstask context +private -basement project:spring cleaning
The command in Listing 7 tells dstask to only pay attention to tasks tagged as private
that do not contain the basement
keyword, but that do belong to the spring cleaning
project. For now, the tool ignores all other tasks. If you create a new task at this point, it will automatically be tagged private
and will belong to the spring cleaning
project.
To reset the filter, type:
dstask context none
This tells dstask to get back to work on all existing tasks again. A call to dstask reveals the active context. If you are missing a task, check the context first (Figure 5).
Templates
You probably need to clean up your desk far more often than your basement. For recurring tasks, templates can save you some typing (Figure 6). Templates are initially conventional tasks, but you create them using the template
keyword (Listing 8, line 1). To show all existing templates, enter
dstask show-templates
which ignores any remaining actions.
Listing 8
Templates
01 $ dstask template clean up desk +Private P3 project:administration 02 $ dstask add template:4 sort pencils
To create a new task based on a template, you run add
again, but reference the template. The command from line 2 of Listing 8 tells dstask to create a new task that takes all the settings from the template ID 4
, but uses the Sort pencils string as the summary.
Git Games
The dstask git log
command (Figure 7) returns the latest completed actions. Actions can be undone by typing dstask undo 3
, where the number (3
) indicates the number of actions to be revoked, starting with the last action performed.
If you want to synchronize your task collection with other devices, dstask needs to be installed on those devices as well. In addition, you need a Git repository that all devices can access, such as one on GitHub. Make sure that only you have access to the repository; do not make it public to the entire Internet.
First, create the ~/.dstask/
directory on all devices and clone the contents of the external Git repository to it using git clone
. You can now create and manage your tasks in the usual way. To tell dstask to push all the changes to the external Git repository, call dstask sync
.
On another PC, call dstask sync
again. This tells dstask to sync with the Git repository and fetch the current state. Under the hood, dstask calls the git pull
and git push
commands. If you are familiar with Git, you can run other Git commands via the dstask git
action.
« Previous 1 2 3 4 Next »
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Budgie 10.10 Scheduled for Q1 2025 with a Surprising Desktop Update
If Budgie is your desktop environment of choice, 2025 is going to be a great year for you.
-
Firefox 134 Offers Improvements for Linux Version
Fans of Linux and Firefox rejoice, as there's a new version available that includes some handy updates.
-
Serpent OS Arrives with a New Alpha Release
After months of silence, Ikey Doherty has released a new alpha for his Serpent OS.
-
HashiCorp Cofounder Unveils Ghostty, a Linux Terminal App
Ghostty is a new Linux terminal app that's fast, feature-rich, and offers a platform-native GUI while remaining cross-platform.
-
Fedora Asahi Remix 41 Available for Apple Silicon
If you have an Apple Silicon Mac and you're hoping to install Fedora, you're in luck because the latest release supports the M1 and M2 chips.
-
Systemd Fixes Bug While Facing New Challenger in GNU Shepherd
The systemd developers have fixed a really nasty bug amid the release of the new GNU Shepherd init system.
-
AlmaLinux 10.0 Beta Released
The AlmaLinux OS Foundation has announced the availability of AlmaLinux 10.0 Beta ("Purple Lion") for all supported devices with significant changes.
-
Gnome 47.2 Now Available
Gnome 47.2 is now available for general use but don't expect much in the way of newness, as this is all about improvements and bug fixes.
-
Latest Cinnamon Desktop Releases with a Bold New Look
Just in time for the holidays, the developer of the Cinnamon desktop has shipped a new release to help spice up your eggnog with new features and a new look.
-
Armbian 24.11 Released with Expanded Hardware Support
If you've been waiting for Armbian to support OrangePi 5 Max and Radxa ROCK 5B+, the wait is over.