Skip to content
Luke Bonham edited this page Jan 23, 2017 · 29 revisions

Attaches a taskwarrior notifications to a widget, and lets you execute task commands from the promptbox.

lain.widgets.contrib.task.attach(widget, args)

args is an optional table which can contain:

Variable Meaning Type Default
show_cmd Taskwarrior command to show in the popup string "task"
prompt_text Prompt text string "Enter task command: "
followtag Display the notification on currently focused screen boolean false
notification_preset Notification preset table naughty.config.defaults

The tasks are shown in a notification popup when the mouse is moved over the attached widget, and the popup is hidden when the mouse is moved away. By default, the notification will show the output of task (same as task next). With show_cmd, the task popup command can be customized, for example if you want to filter the tasks or show a custom report.

In multiple screen setups, the default behaviour is to show a visual notification pop-up window on the first screen. By setting followtag to true it will be shown on the currently focused tag screen.

You can call the notification with a keybinding like this:

awful.key({ modkey, altkey }, "t", function () lain.widgets.contrib.task.show(scr) end),

where altkey = "Mod1" and scr (optional) indicates the screen which you want the notification in.

And you can prompt to input a task command with a keybinding like this:

awful.key({ altkey }, "t", lain.widgets.contrib.task.prompt),
Clone this wiki locally