taskwarrior-tui icon indicating copy to clipboard operation
taskwarrior-tui copied to clipboard

Better handling of reports

Open jakec-dev opened this issue 4 years ago • 4 comments

Description

As far as I can tell, tui only provides access to the task next report. It would be fantastic if the following features were also provided:

  • Tab at the top of the page (i.e. Task | Calendar | Reports) that takes users to a page that lists all available reports. Users could scroll through the list, select the report they want to view, then tui will open that report.

  • Ability to add shortcuts for viewing tasks.

edit: I got this to work, so ignore this suggestion. Simply replace task inbox in the below tash-inbox.sh file with taskwarrior-tui --report=inbox. This will open a new subshell with the report when you press 1. Pressing q on the report will close the subshell and return you back to where you were in tui.

For example, if I want to view my inbox report, I could create a shortcut such as:

~/.config/taskwarrior-tui/task-inbox.sh

#!/bin/bash
task inbox

~/.config/task/taskrc

report.inbox.columns = id,description
report.inbox.description = Inbox
report.inbox.filter = status:pending (+inbox)
report.inbox.labels = ID,Description

uda.taskwarrior-tui.shortcuts.1=~/.config/taskwarrior-tui/task-inbox.sh

If this feature is enabled, it would mean I would only need to press the 1 key and it would load my inbox report.

Currently the only way to do this is to setup a bash alias such as alias inbox="taskwarrior-tui --report=inbox", then when you're in tui you would need to press q to exit out, type the alias inbox in your terminal, then it will open up tui again with the report. It would be much more convenient if you could do this using shortcuts in tui without having to exit/re-open tui each time.

  • Key binding for selecting report. For example, press r in tui will change the Filter Tasks input to Report, and you can then type the name of the report you want to view. e.g. r next will bring up the next report, r inbox would bring up my custom inbox report, etc.

Solution

Solutions provided above

Additional context

Love the app :)

jakec-dev avatar Jul 27 '21 00:07 jakec-dev

Great suggestions! I’ll have to think about how to go about implementing some of it. The task report list should be super straightforward though.

kdheepak avatar Jul 27 '21 03:07 kdheepak

I would like the report tabs to be configurable. By default, only one tab with the task next report the way it is now. And then have the possibility adding entries to the .taskrc to have more tabs that display other reports (Wishlish, shopping list, etc)

image

dgrabla avatar Nov 01 '23 10:11 dgrabla

This will likely happen as part of or after #349

kdheepak avatar Nov 01 '23 14:11 kdheepak

edit: I got this to work, so ignore this suggestion. Simply replace task inbox in the below tash-inbox.sh file with taskwarrior-tui --report=inbox. This will open a new subshell with the report when you press 1. Pressing q on the report will close the subshell and return you back to where you were in tui.

Thanks for this clever suggestion!

I have made your script a bit more flexible. ~/taskwarrior-tui_report.sh

#!/usr/bin/env bash
taskwarrior-tui --report="$1"

This allows to easily bind multiple reports to the number keys. E.g.:

uda.taskwarrior-tui.shortcuts.1=~/taskwarrior-tui_report.sh yesterday
uda.taskwarrior-tui.shortcuts.2=~/taskwarrior-tui_report.sh today
uda.taskwarrior-tui.shortcuts.3=~/taskwarrior-tui_report.sh completed

qadzek avatar Dec 01 '23 16:12 qadzek