dotfiles

Cross platform dotfiles for linux, mac and windows

commit 76c4d92adfad5fc8b1c5e60f73647499e58b858e
parent 4af54e25d8753d6d6b0071bfe059d018d746b0de
Author: Bharatvaj Hemanth <bharatvaj@yahoo.com>
Date: Thu, 1 Aug 2024 23:32:57 +0530

Fix pfs on windows
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/.config/cmd/patch/.config/alacritty/windows.yml b/.config/cmd/patch/.config/alacritty/windows.yml
@@ -1,3 +0,0 @@
-shell:
-  program: cmd
-
diff --git a/.local/bin/sh/pfs b/.local/bin/sh/pfs
@@ -2,15 +2,20 @@
 
 # reliable password fuzzy searcher
 
+: ${PASSWORD_STORE_DIR?"Error var not set"}
 cd "${PASSWORD_STORE_DIR}" || exit 1
 
+export PASSWORD_STORE_KEY=bharatvaj@yahoo.com
+PASSTOOL=spm
+type ${PASSTOOL} 2>/dev/null || PASSTOOL=pass
+
 selection="$(find -L . -name '*.gpg' | sed 's/.gpg$//g' | ${FUZZER})"
 
 
 test -z "${selection}" || {
 	case ${selection} in
-		*totp/*) pass otp "${selection}" ;;
-		*) spm ${1:-"show"} "${selection}" ;;
+		*totp/*) ${PASSTOOL} otp "${selection}" ;;
+		*) ${PASSTOOL} ${1:-"show"} "${selection}" ;;
 	esac
 }