summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-06-26 22:56:01 +0300
committerPaul Buetow <paul@buetow.org>2025-06-26 22:56:01 +0300
commit774cbc9e1a84228ccbcf15c8f982bab1b8a38a01 (patch)
tree2d56a03a6d88ed57c2ad70ba337a1d0a4d87a8a6
parent7da6c9c2ccc45430f82214bfd43979dc405fb455 (diff)
Update
-rw-r--r--dotfiles/fish/conf.d/taskwarrior.fish31
1 files changed, 12 insertions, 19 deletions
diff --git a/dotfiles/fish/conf.d/taskwarrior.fish b/dotfiles/fish/conf.d/taskwarrior.fish
index 6431438..0f69e7c 100644
--- a/dotfiles/fish/conf.d/taskwarrior.fish
+++ b/dotfiles/fish/conf.d/taskwarrior.fish
@@ -24,24 +24,6 @@ function taskwarrior::due::count
end
end
-function taskwarrior::url::open
- taskwarrior::select $argv[1]
-
- set -l desc (task $TASK_ID export | jq -r '.[].description')
- set -l url (taskwarrior::url::extract "$desc")
-
- if test (uname) = Darwin
- open -a "Google Chrome" "$url"
- else if test (uname) = Linux
- xdg-open "$url"
- end
-end
-
-function taskwarrior::url::extract
- set -l str "$argv[1]"
- echo $str | sed -E 's|.*(https?://.+) .*|\1|'
-end
-
function taskwarrior::add::track
if test (count $argv) -gt 0
task add priority:L +personal +track $argv
@@ -50,6 +32,17 @@ function taskwarrior::add::track
end
end
+function taskwarrior::add::track::timr
+ timr stop
+ set -l minutes (timr status rawm)
+ if test $minutes -eq 0
+ echo "Nothing to track from timr"
+ return
+ end
+ taskwarrior::add::track "$minutes"min $argv
+ timr reset
+end
+
function taskwarrior::add::standup
if test (count $argv) -gt 0
task add priority:L +work +standup +sre +nosched $argv
@@ -126,8 +119,8 @@ abbr -a tasks 'tasksamurai -track'
abbr -a tread 'tasksamurai +read'
abbr -a track 'taskwarrior::add::track'
abbr -a tra 'taskwarrior::add::track'
+abbr -a trat 'taskwarrior::add::track::timr'
abbr -a tfind 'taskwarrior::fuzzy::find'
-abbr -a topen 'taskwarrior::url::open'
abbr -a ts tasksamurai
# Virtual standup abbrs