Skip to content

Commit

Permalink
taskwarrior module: add report parameter (#2141)
Browse files Browse the repository at this point in the history
  • Loading branch information
vEnhance committed Oct 2, 2022
1 parent 6df7f8c commit afeab68
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions py3status/modules/taskwarrior.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
cache_timeout: refresh interval for this module (default 5)
filter: specify one or more criteria to use (default 'status:pending')
format: display format for this module (default '{descriptions}')
report: report to export, for TaskWarrior 2.6.0 and above (default '')
Format placeholders:
{descriptions} descriptions of active tasks
Expand Down Expand Up @@ -33,6 +34,7 @@ class Py3status:
cache_timeout = 5
filter = "status:pending"
format = "{descriptions}"
report = ""

class Meta:
deprecated = {
Expand All @@ -53,6 +55,8 @@ def post_config_hook(self):
self.taskwarrior_command = f"task {self.filter} export"
else:
self.taskwarrior_command = "task export"
if self.report:
self.taskwarrior_command += " " + self.report

@staticmethod
def descriptions(tasks_json):
Expand Down

0 comments on commit afeab68

Please sign in to comment.