forked from umgeher/pass-rofi
init
This commit is contained in:
commit
806beb252d
4 changed files with 53 additions and 0 deletions
15
.makefile.~undo-tree~
Normal file
15
.makefile.~undo-tree~
Normal file
File diff suppressed because one or more lines are too long
13
LICENSE
Normal file
13
LICENSE
Normal file
|
@ -0,0 +1,13 @@
|
|||
Copyright (c) 2022 Umgeher Torgersen <me@umgeher.org>
|
||||
|
||||
Permission to use, copy, modify, and distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
11
makefile
Normal file
11
makefile
Normal file
|
@ -0,0 +1,11 @@
|
|||
.PHONY: install uninstall
|
||||
.MAIN: install
|
||||
|
||||
install:
|
||||
mkdir -p ~/bin
|
||||
cp -vf pass-rofi ~/bin/
|
||||
chmod +x ~/bin/pass-rofi
|
||||
|
||||
uninstall:
|
||||
rm -vf ~/bin/pass-rofi
|
||||
|
14
pass-rofi
Executable file
14
pass-rofi
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/ksh
|
||||
|
||||
export GPG_TTY=$(tty)
|
||||
|
||||
KEY=$(cd ~/.password-store ; find . -type f -name "*.gpg" | sed 's/\.gpg//g' | sed 's/\.\///g' | sort | rofi -dmenu)
|
||||
|
||||
if [[ -n $(echo $KEY | grep "otp") ]]; then
|
||||
pass otp "$KEY" | { IFS= read -r pass; printf %s "$pass"; } | xsel -i
|
||||
else
|
||||
pass "$KEY" | { IFS= read -r pass; printf %s "$pass"; } | xsel -i
|
||||
fi
|
||||
|
||||
xsel -o | xsel -bi
|
||||
xsel -o | xsel -si
|
Loading…
Add table
Add a link
Reference in a new issue