Commit 46c7e7b

xxwhirlpool  ·  2026-04-01 21:12:15 -0400 EDT
parent eeab81c
passmenu support for pass-otp, bashrc laptop
2 files changed,  +21, -5
+10, -0
......@@ -101,6 +101,7 @@ alias c="clear"
101101 alias updupgr="sudo apt update && sudo apt upgrade"
102102 alias freeze="freeze -c user"
103103 alias glow="glow -p"
104+alias unfuckwifi="sudo systemctl restart NetworkManager"
104105
105106 # some cd bookmarks
106107 alias dotf="cd /home/kat/dotfiles"
......@@ -160,6 +161,15 @@ export FZF_DEFAULT_OPTS=" \
160161 --color=marker:#BABBF1,fg+:#C6D0F5,prompt:#CA9EE6,hl+:#E78284 \
161162 --color=border:#414559,label:#C6D0F5"
162163
164+export FZF_CTRL_T_OPTS="
165+ --walker-skip .git,node_modules,target
166+ --preview 'batcat -n --color=always {}'
167+ --bind 'ctrl-/:change-preview-window(down|hidden|)'"
168+
169+export FZF_ALT_C_OPTS="
170+ --walker-skip .git,node_modules,target
171+ --preview 'tree -C {}'"
172+
163173 export LEDGER_FILE=~/.config/hledger/katmoney.journal
164174
165175 ######################################
+11, -5
......@@ -1,9 +1,9 @@
11 #!/usr/bin/env bash
22
3-shopt -s nullglob globstar
3+shopt -s nullglob globstar extglob
44
55 typeit=0
6-if [[ $1 == "--type" ]]; then
6+if [[ "$1" == "--type" ]]; then
77 typeit=1
88 shift
99 fi
......@@ -15,10 +15,16 @@ password_files=( "${password_files[@]%.gpg}" )
1515
1616 password=$(printf '%s\n' "${password_files[@]}" | dmenu -i -c -l 10 "$@")
1717
18-[[ -n $password ]] || exit
18+[[ -n "$password" ]] || exit
1919
20-if [[ $typeit -eq 0 ]]; then
21- pass show -c "$password" 2>/dev/null
20+if [[ "$typeit" -eq 0 ]]; then
21+ # if you pick something in the "2fa" folder, generate a code
22+ # else it's a normal password, copy it to clipboard
23+ if [[ "${password_files[*]}" =~ 2fa && "$password" =~ 2fa ]]; then
24+ pass otp "$password" | perl -pe "chomp if eof" | xclip -sel clipboard
25+ else
26+ pass show -c "$password" 2>/dev/null
27+ fi
2228 else
2329 pass show "$password" | { IFS= read -r pass; printf %s "$pass"; }
2430 fi