- commit
- 46c7e7b
- parent
- eeab81c
- author
- xxwhirlpool
- date
- 2026-04-01 21:12:15 -0400 EDT
passmenu support for pass-otp, bashrc laptop
2 files changed,
+21,
-5
+10,
-0
1@@ -101,6 +101,7 @@ alias c="clear"
2 alias updupgr="sudo apt update && sudo apt upgrade"
3 alias freeze="freeze -c user"
4 alias glow="glow -p"
5+alias unfuckwifi="sudo systemctl restart NetworkManager"
6
7 # some cd bookmarks
8 alias dotf="cd /home/kat/dotfiles"
9@@ -160,6 +161,15 @@ export FZF_DEFAULT_OPTS=" \
10 --color=marker:#BABBF1,fg+:#C6D0F5,prompt:#CA9EE6,hl+:#E78284 \
11 --color=border:#414559,label:#C6D0F5"
12
13+export FZF_CTRL_T_OPTS="
14+ --walker-skip .git,node_modules,target
15+ --preview 'batcat -n --color=always {}'
16+ --bind 'ctrl-/:change-preview-window(down|hidden|)'"
17+
18+export FZF_ALT_C_OPTS="
19+ --walker-skip .git,node_modules,target
20+ --preview 'tree -C {}'"
21+
22 export LEDGER_FILE=~/.config/hledger/katmoney.journal
23
24 ######################################
1@@ -1,9 +1,9 @@
2 #!/usr/bin/env bash
3
4-shopt -s nullglob globstar
5+shopt -s nullglob globstar extglob
6
7 typeit=0
8-if [[ $1 == "--type" ]]; then
9+if [[ "$1" == "--type" ]]; then
10 typeit=1
11 shift
12 fi
13@@ -15,10 +15,16 @@ password_files=( "${password_files[@]%.gpg}" )
14
15 password=$(printf '%s\n' "${password_files[@]}" | dmenu -i -c -l 10 "$@")
16
17-[[ -n $password ]] || exit
18+[[ -n "$password" ]] || exit
19
20-if [[ $typeit -eq 0 ]]; then
21- pass show -c "$password" 2>/dev/null
22+if [[ "$typeit" -eq 0 ]]; then
23+ # if you pick something in the "2fa" folder, generate a code
24+ # else it's a normal password, copy it to clipboard
25+ if [[ "${password_files[*]}" =~ 2fa && "$password" =~ 2fa ]]; then
26+ pass otp "$password" | perl -pe "chomp if eof" | xclip -sel clipboard
27+ else
28+ pass show -c "$password" 2>/dev/null
29+ fi
30 else
31 pass show "$password" | { IFS= read -r pass; printf %s "$pass"; }
32 fi