From 28e6afe3f1982be71eb31b82f1ce275659202760 Mon Sep 17 00:00:00 2001 From: Phantop Date: Sat, 29 Jun 2019 19:14:54 -0400 Subject: [PATCH] Fish: New timer --- .config/fish/config.fish | 2 +- .config/fish/functions/timer.fish | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 .config/fish/functions/timer.fish diff --git a/.config/fish/config.fish b/.config/fish/config.fish index 2c1c8ec..05bcc26 100644 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -1,7 +1,7 @@ # PATHS # set -gx ANDROID_HOME $D/Installs/Android/sdk set fish_user_paths $D/Tools/bin $ANDROID_HOME/platform-tools /sbin /bin /usr/sbin /usr/bin -set fish_function_path $D/Games/Minecraft/Game/functions $fish_function_path +set fish_function_path $fish_function_path $D/Games/Minecraft/Game/functions # PROGRAM SETTINGS # set -gx EDITOR nvim diff --git a/.config/fish/functions/timer.fish b/.config/fish/functions/timer.fish new file mode 100644 index 0000000..b998971 --- /dev/null +++ b/.config/fish/functions/timer.fish @@ -0,0 +1,14 @@ +# Defined in /tmp/fish.HpGyIZ/timer.fish @ line 2 +function timer + if tty | grep 'not a tty' + qb / ":quickmark-load timer"; + else + while true + for i in (seq -w 1200 -1 0) + echo (math -s0 $i/60):(math $i%60) + sleep 1 + end + zenity --info --text=Time to take a break! + end + end +end