aboutsummaryrefslogtreecommitdiff
path: root/config/fish/functions
diff options
context:
space:
mode:
Diffstat (limited to 'config/fish/functions')
-rw-r--r--config/fish/functions/timer.fish17
1 files changed, 17 insertions, 0 deletions
diff --git a/config/fish/functions/timer.fish b/config/fish/functions/timer.fish
new file mode 100644
index 0000000..7d8bb0e
--- /dev/null
+++ b/config/fish/functions/timer.fish
@@ -0,0 +1,17 @@
+function timer
+ if test (count $argv) -ne 1
+ echo "Usage: timer <minutes to wait>"
+ return
+ end
+ for i in (seq 1 $argv[1])
+ sleep 1m
+ echo (string replace -r '^0$' ready! (math $argv[1] - $i))m left
+ end
+ while true
+ for i in (seq 1 20)
+ xkbbell
+ sleep 1
+ end
+ sleep 1m
+ end
+end