From 8631335ebd045a374d7e57d36c8023ff446eec8d Mon Sep 17 00:00:00 2001 From: "Adam T. Carpenter" Date: Tue, 19 Dec 2023 10:44:47 -0500 Subject: feat: better rofi pass using builtin script api Simple Rofi pass acts as a modi for otp or pass selection --- passmenu.sh | 43 ------------------------------------------- 1 file changed, 43 deletions(-) delete mode 100755 passmenu.sh (limited to 'passmenu.sh') diff --git a/passmenu.sh b/passmenu.sh deleted file mode 100755 index a7bd8cb..0000000 --- a/passmenu.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh -prefix=${PASSWORD_STORE_DIR:-~/.password-store} - -get_password() { - dmenu -i -p pass -} - -get_passwords() { - find -s "$prefix" -type f -name '*.gpg' -} - -trim_prefix() { - while read line - do - printf '%s\n' "${line##$prefix/}" - done -} - -trim_suffix() { - while read line - do - printf '%s\n' "${line%%.gpg}" - done -} - -copy_pass() { - [ -n "$1" ] || return - - otp='' - - case "$1" in - totp*) - otp=otp - ;; - esac - - pass $otp show --clip "$1" 2>/dev/null -} - -password=$(get_passwords | trim_prefix | trim_suffix | get_password) -[ -n "$password" ] || exit 0 -msg=$(copy_pass "$password") -notify-send passmenu "$msg" -- cgit v1.2.3