Add .taskrc and functions for working with taskwarrior

This commit is contained in:
mitchell 2020-08-11 12:16:26 -04:00
parent d1ad6dbf21
commit 954b6d4220
4 changed files with 51 additions and 1 deletions

View File

@ -7,7 +7,7 @@ function define_aliases -a uname -d 'Defines aliases for commonly used commands'
alias tocb 'xclip -in -selection clipboard' alias tocb 'xclip -in -selection clipboard'
alias fromcb 'xclip -out -selection clipboard' alias fromcb 'xclip -out -selection clipboard'
alias ssh-rm-host 'ssh-keygen -f ~/.ssh/known_hosts -R' alias ssh-rm-host 'ssh-keygen -f ~/.ssh/known_hosts -R'
alias wiki 'nvim +VimwikiIndex; and exit' alias wiki 'nvim +VimwikiIndex'
switch "$uname" switch "$uname"
case 'Linux' case 'Linux'

View File

@ -0,0 +1,4 @@
function tasko -a id -d 'Open the link of a taskwarrior task by id'
set link (task _get $id.link)
if test -n $link; open $link; end
end

View File

@ -0,0 +1,9 @@
function taskwiki -a id
set page (task _get $id.wiki)
if test -n $page
$EDITOR +VimwikiIndex "+VimwikiGoto $page"
else
echo 'no wiki file specified'
end
end

37
.taskrc Normal file
View File

@ -0,0 +1,37 @@
# [Created by task 2.5.1 8/10/2020 11:48:16]
# Taskwarrior program configuration file.
# For more documentation, see http://taskwarrior.org or try 'man task', 'man task-color',
# 'man task-sync' or 'man taskrc'
# Here is an example of entries that use the default, override and blank values
# variable=foo -- By specifying a value, this overrides the default
# variable= -- By specifying no value, this means no default
# #variable=foo -- By commenting out the line, or deleting it, this uses the default
# Use the command 'task show' to see all defaults and overrides
# Files
data.location=~/.task
# Color theme (uncomment one to use)
#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/light-16.theme
#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/light-256.theme
#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/dark-16.theme
#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/dark-256.theme
#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/dark-red-256.theme
#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/dark-green-256.theme
#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/dark-blue-256.theme
#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/dark-violets-256.theme
#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/dark-yellow-green.theme
#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/dark-gray-256.theme
#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/dark-gray-blue-256.theme
#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/solarized-dark-256.theme
#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/solarized-light-256.theme
#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/no-color.theme
uda.link.type=string
uda.link.label=Link
uda.file.type=string
uda.file.label=File
uda.wiki.type=string
uda.wiki.label=Wiki