diff options
author | Christopher R. Nelson <christopher.nelson@languidnights.com> | 2023-09-02 15:39:58 -0400 |
---|---|---|
committer | Christopher R. Nelson <christopher.nelson@languidnights.com> | 2023-09-02 15:39:58 -0400 |
commit | 99470bda884aa47b7660576396bb912bf3ecf7aa (patch) | |
tree | 6283f64d7156fbfd8bfb18ec2a33861f41516aac /.config/openbox/todoman.sh | |
parent | 60f7bde7e10af2727e86faa3e027c1de43617161 (diff) |
Diffstat (limited to '.config/openbox/todoman.sh')
-rwxr-xr-x | .config/openbox/todoman.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/.config/openbox/todoman.sh b/.config/openbox/todoman.sh new file mode 100755 index 0000000..636c97c --- /dev/null +++ b/.config/openbox/todoman.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +echo "<openbox_pipe_menu>" +echo "<item label=\"New\">" +echo "<action name=\"Execute\"><execute>x-terminal-emulator -e todoman new $id</execute></action>" +echo "</item>" +echo "<separator />" + +tasks=$(todoman --porcelain | jq ".[]" -c) +while read -r task; do + summary=$(echo $task | jq ".summary" -r) + description=$(echo $task | jq ".description" -r) + id=$(echo $task | jq ".id" -r) + echo "<menu id=\"$summary\" label=\"$summary\">" + echo "<item label=\"$description\" />" + echo "<separator />" + echo "<item label=\"Edit\">" + echo "<action name=\"Execute\"><execute>x-terminal-emulator -e todoman edit $id</execute></action>" + echo "</item>" + echo "<item label=\"Complete\">" + echo "<action name=\"Execute\"><execute>todoman done $id</execute></action>" + echo "</item>" + echo "</menu>" +done <<< $tasks + +echo "</openbox_pipe_menu>" |