From 7eaf90f2727e295e99edb1a1aa5dea88d1393897 Mon Sep 17 00:00:00 2001 From: Chris Speck Date: Thu, 8 Feb 2024 20:39:48 +1100 Subject: [PATCH] Add tig and nvim to exclusions list --- Cargo.lock | 2 +- Cargo.toml | 2 +- README.MD | 4 ++-- src/assets/shell-hook | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4a41065..159a4d9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1967,7 +1967,7 @@ dependencies = [ [[package]] name = "yapc" -version = "1.0.0" +version = "1.0.1" dependencies = [ "clap", "config", diff --git a/Cargo.toml b/Cargo.toml index de1e314..cf92407 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yapc" -version = "1.0.0" +version = "1.0.1" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/README.MD b/README.MD index 9e2d4ce..f3e3018 100644 --- a/README.MD +++ b/README.MD @@ -61,8 +61,8 @@ To avoid unnecessary notifications: The defaults are set is in [shell-hook](src/assets/shell-hook) and may be overridden as follows: ```shell -# e.g. increase default notification threshold to 60 seconds -export AUTO_YAPC_DONE_LONGER_THAN=60 +# e.g. increase default notification threshold to 90 seconds +export AUTO_YAPC_DONE_LONGER_THAN=90 # e.g. set ignore list to following export AUTO_YAPC_DONE_IGNORE="vim screen meld" ``` diff --git a/src/assets/shell-hook b/src/assets/shell-hook index 66f74da..8f847cd 100644 --- a/src/assets/shell-hook +++ b/src/assets/shell-hook @@ -5,11 +5,11 @@ function _yapc_precmd() { [[ -n "$yapc_start_time" ]] || return local duration=$(($(date +%s) - $yapc_start_time)) yapc_start_time='' - auto_yapc_done_longer_than=${AUTO_YAPC_DONE_LONGER_THAN:-30} + auto_yapc_done_longer_than=${AUTO_YAPC_DONE_LONGER_THAN:-60} [[ "$duration" -le "$auto_yapc_done_longer_than" ]] && return local appname appname=$(basename "${yapc_command%% *}") - auto_yapc_done_ignore=${AUTO_YAPC_DONE_IGNORE:-ntf emacs htop info less mail man meld most mutt nano screen ssh tail tmux top vi vim watch} + auto_yapc_done_ignore=${AUTO_YAPC_DONE_IGNORE:-ntf emacs htop info less mail man meld most mutt nano nvim screen ssh tail tig tmux top vi vim watch} [[ " $auto_yapc_done_ignore " == *" $appname "* ]] && return (yapc shell-done "$code" "$duration" "$yapc_command" &) }