kdheepak / taskwarrior-tui

`taskwarrior-tui`: A terminal user interface for taskwarrior
https://kdheepak.com/taskwarrior-tui
MIT License
1.47k stars 68 forks source link

Better handling of reports #254

Open jakec-dev opened 3 years ago

jakec-dev commented 3 years ago

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:

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.

Solutions provided above

Additional context

Love the app :)

kdheepak commented 3 years ago

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.

dgrabla commented 10 months ago

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

kdheepak commented 10 months ago

This will likely happen as part of or after #349

qadzek commented 9 months ago

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