#!/bin/bash

output="$(task projects | egrep -v '(Project|projects|---)' | \
awk '{print $1}' | sed '/^$/d' | rofi -dmenu -p 'TaskWarrior: ')"

task add project:$output

#!/bin/bash

output="$(todo.py projects | rofi -dmenu -p 'Todoist: ')"

todo.py add $output

Change rofi to use todoist script
Change rofi to use todoist script
