From 30c293419bf25c09cabe694964c2c07f2fac69bf Mon Sep 17 00:00:00 2001 From: cyber-styx <120685425+cyber-styx@users.noreply.github.com> Date: Fri, 24 Mar 2023 23:30:09 -0700 Subject: [PATCH] Update flash moved CARD_POOL_SIZE down so the CURRENT_DECK variable could be used to get the number of cards. works so far but I know *very little* about bash scripting --- flash | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flash b/flash index 57e331b..3927d8c 100755 --- a/flash +++ b/flash @@ -24,10 +24,10 @@ #==============================================================# # USER CUSTOMIZABLE VARIABLES -CARD_POOL_SIZE=10 ######## How large the pool size is for shuf to draw from SEARCH_DEPTH=999 ######### How many levels to recursively search for .csv's in .local/share/flash PREVIEWER='bat' ########## What fzf previewer to use when searching through decks CURR_DECK_DISPLAY="file" # Options are 'file' or 'path' + ######## How large the pool size is for shuf to draw from # ANSI FOREGROUND ESCAPE COLORS RED='\033[0;31m' @@ -222,6 +222,7 @@ file) CURRENT_DECK="$(echo "$DECK" | awk -F/ '{print $NF}')" ;; path) CURRENT_DECK="$DECK" ;; *) CURRENT_DECK="$(echo "$DECK" | awk -F/ '{print $NF}')" ;; esac +CARD_POOL_SIZE=$(wc -l $CURRENT_DECK | cut -c 1-2) # The top part of the flash display so that code is not duplicated twice print_head() {