Re: otp in passmenu

2021-04-15 Thread Gildásio Júnior
Yeah, thanks Kenny for made me clear. By "demand" I mean something like
"I would like this" not "I want this in my desk tonight".

My main purpose with the original message was to understand why the
Alessandro's patch wasn't more discussed/merged and receive feedbacks to
made my patch better.

I like the fork idea, maybe I'll do something like this (actually just
this patch I'm thinking now).

On Sun, Apr 11, 2021 at 03:58:22PM -0400, Kenny Evitt wrote:
> I suspect Gildásio used "demand" but meant "request". Nothing else in their
> email implies that they're 'demanding' anything from Jason, the maintainer,
> or anyone else.
> 
> 
> 
> I think it might be reasonable for people to seriously consider forking
> Pass. No one's obligated to do anything. But no one's obligated to refrain
> from changing Pass, or refrain from sharing those changes either.
> 
> (I'd strongly suggest picking a new distinctive name, or at least a
> distinctive variation on "pass" or "password store".)
> 
> I suspect Jason considers Pass mostly complete as-is. And that's fine! I
> mostly agree with that myself. My own previous patches were never accepted,
> and Jason had good reasons for doing so.
> 
> But it's frustrating not having patches accepted, or running one's own
> custom private 'fork'. If people want to make changes useful to them, and
> share those changes with others, then a fork could make sense. (It's a lot
> of work tho!)
> 
> On Sun, Apr 11, 2021 at 10:07 AM Jonas Kalderstam <
> jo...@cowboyprogrammer.org> wrote:
> 
> > On 9 April 2021 04:09:03 CEST, "Gildásio Júnior" <
> > gildasiojun...@riseup.net> wrote:
> > >I have the same demand as Alessandro Accardo mentioned in Sep 2018 [0].
> > >He submited a patch, receive a feedback, updated it and I couldn't see
> > >any other new feedback.
> >
> > I wouldn't expect much in terms of a reply when you have "demands" on
> > people working for free in their spare time..
> >
> > >PS: I didn't have experience contribut with git patches by email. So
> > >please let me know if I did something wrong and how can get the right
> > >path.
> >
> > See https://git-send-email.io for an excellent guide to git and email.
> >
> >
> >

-- 
[]'s
Gildásio Júnior


signature.asc
Description: PGP signature


Re: otp in passmenu

2021-04-11 Thread Oliver Ford
> I suspect Gildásio used "demand" but meant "request". Nothing else in
> their email implies that they're 'demanding' anything from Jason, the
> maintainer, or anyone else.

Hear hear. I didn't think I was reading too charitably in assuming a 
translation quirk. I know I do a far worse job of trying to speak any 
non-English languages than that.

> I think it might be reasonable for people to seriously consider
> forking Pass. [etc.]

Those desiring a version of pass that's more, how should I put it, 'continually 
iterated on', might consider 'gopass':

https://github.com/gopasspw/gopass

It's a re-write rather than an actual fork, but it aims for pass-compatibility 
and is already (~4k 'stars') popular. I've no affiliation (perhaps some trivial 
patch), and perhaps there's a good reason (?) to prefer a true fork/a bash 
script (ok it's truer to the front and centre Unix philosophy adhered to by 
pass I suppose) in which case this isn't that.

If the most important thing to you in 'pass' is a new feature though, I think 
it's considerably more likely 'over there'.

-- 
  Oliver Ford
  dev.git.password-st...@ojford.com

On Sun, 11 Apr 2021, at 19:59, Kenny Evitt wrote:
> I suspect Gildásio used "demand" but meant "request". Nothing else in
> their email implies that they're 'demanding' anything from Jason, the
> maintainer, or anyone else.
> 
> 
> 
> I think it might be reasonable for people to seriously consider
> forking Pass. No one's obligated to do anything. But no one's
> obligated to refrain from changing Pass, or refrain from sharing those
> changes either.
> 
> (I'd strongly suggest picking a new distinctive name, or at least a
> distinctive variation on "pass" or "password store".)
> 
> I suspect Jason considers Pass mostly complete as-is. And that's fine!
> I mostly agree with that myself. My own previous patches were never
> accepted, and Jason had good reasons for doing so.
> 
> But it's frustrating not having patches accepted, or running one's own
> custom private 'fork'. If people want to make changes useful to them,
> and share those changes with others, then a fork could make sense.
> (It's a lot of work tho!)
> 
> 
> On Sun, Apr 11, 2021 at 10:07 AM Jonas Kalderstam
>  wrote:
> >
> > On 9 April 2021 04:09:03 CEST, "Gildásio Júnior" 
> >  wrote:
> > >I have the same demand as Alessandro Accardo mentioned in Sep 2018 [0].
> > >He submited a patch, receive a feedback, updated it and I couldn't see
> > >any other new feedback.
> >
> > I wouldn't expect much in terms of a reply when you have "demands" on 
> > people working for free in their spare time..
> >
> > >PS: I didn't have experience contribut with git patches by email. So
> > >please let me know if I did something wrong and how can get the right
> > >path.
> >
> > See https://git-send-email.io for an excellent guide to git and email.
> >
> >
> 
>


Re: otp in passmenu

2021-04-11 Thread Kenny Evitt
I suspect Gildásio used "demand" but meant "request". Nothing else in
their email implies that they're 'demanding' anything from Jason, the
maintainer, or anyone else.



I think it might be reasonable for people to seriously consider
forking Pass. No one's obligated to do anything. But no one's
obligated to refrain from changing Pass, or refrain from sharing those
changes either.

(I'd strongly suggest picking a new distinctive name, or at least a
distinctive variation on "pass" or "password store".)

I suspect Jason considers Pass mostly complete as-is. And that's fine!
I mostly agree with that myself. My own previous patches were never
accepted, and Jason had good reasons for doing so.

But it's frustrating not having patches accepted, or running one's own
custom private 'fork'. If people want to make changes useful to them,
and share those changes with others, then a fork could make sense.
(It's a lot of work tho!)


On Sun, Apr 11, 2021 at 10:07 AM Jonas Kalderstam
 wrote:
>
> On 9 April 2021 04:09:03 CEST, "Gildásio Júnior"  
> wrote:
> >I have the same demand as Alessandro Accardo mentioned in Sep 2018 [0].
> >He submited a patch, receive a feedback, updated it and I couldn't see
> >any other new feedback.
>
> I wouldn't expect much in terms of a reply when you have "demands" on people 
> working for free in their spare time..
>
> >PS: I didn't have experience contribut with git patches by email. So
> >please let me know if I did something wrong and how can get the right
> >path.
>
> See https://git-send-email.io for an excellent guide to git and email.
>
>


Re: otp in passmenu

2021-04-11 Thread Jonas Kalderstam
On 9 April 2021 04:09:03 CEST, "Gildásio Júnior"  
wrote:
>I have the same demand as Alessandro Accardo mentioned in Sep 2018 [0].
>He submited a patch, receive a feedback, updated it and I couldn't see
>any other new feedback.

I wouldn't expect much in terms of a reply when you have "demands" on people 
working for free in their spare time..

>PS: I didn't have experience contribut with git patches by email. So
>please let me know if I did something wrong and how can get the right
>path.

See https://git-send-email.io for an excellent guide to git and email.




otp in passmenu

2021-04-08 Thread Gildásio Júnior
Hi all,

I have the same demand as Alessandro Accardo mentioned in Sep 2018 [0].
He submited a patch, receive a feedback, updated it and I couldn't see
any other new feedback.

I had patched passmenu to support pass-otp too (in a bigger way than 
he did). I'm sending my patch to receive some feedback and talk about 
the demand we have.

Anyway, thanks for your work. pass and passmenu as well are projects
that I like a lot. Thank you.

PS: I didn't have experience contribut with git patches by email. So
please let me know if I did something wrong and how can get the right
path.

[0]: https://lists.zx2c4.com/pipermail/password-store/2018-September/003406.html

-- 
[]'s
Gildásio Júnior
From bbfce317691dd9db9ac8b6bbd729a70260032dbf Mon Sep 17 00:00:00 2001
From: Gildasio Junior 
Date: Thu, 8 Apr 2021 23:04:44 -0300
Subject: [PATCH] Add pass-otp support in passmenu

---
 contrib/dmenu/README.md |  6 --
 contrib/dmenu/passmenu  | 41 +
 2 files changed, 37 insertions(+), 10 deletions(-)

diff --git a/contrib/dmenu/README.md b/contrib/dmenu/README.md
index 9d54fb4..5e1b4ec 100644
--- a/contrib/dmenu/README.md
+++ b/contrib/dmenu/README.md
@@ -2,12 +2,14 @@
 password manager. This design allows you to quickly copy a password to the
 clipboard without having to open up a terminal window if you don't already have
 one open. If `--type` is specified, the password is typed using [xdotool][]
-instead of copied to the clipboard.
+instead of copied to the clipboard. If `--otp` is specified, the password is
+interpreted as a 2fa OTP token using [pass-otp][].
 
 # Usage
 
-passmenu [--type] [dmenu arguments...]
+passmenu [--type] [--otp] [dmenu arguments...]
 
 [dmenu]: http://tools.suckless.org/dmenu/
 [xdotool]: http://www.semicomplete.com/projects/xdotool/
 [pass]: http://www.zx2c4.com/projects/password-store/
+[pass-otp]: https://github.com/tadfisher/pass-otp
diff --git a/contrib/dmenu/passmenu b/contrib/dmenu/passmenu
index 83268bc..e278330 100755
--- a/contrib/dmenu/passmenu
+++ b/contrib/dmenu/passmenu
@@ -2,24 +2,49 @@
 
 shopt -s nullglob globstar
 
+prefix=${PASSWORD_STORE_DIR-~/.password-store}
 typeit=0
-if [[ $1 == "--type" ]]; then
-   typeit=1
-   shift
-fi
+otp=''
+dir2fa=''
+dmenu_options=''
+
+while [[ $# -gt 0 ]]
+do
+option="$1"
+
+case $option in
+   --type)
+   typeit=1
+   shift
+   ;;
+   --otp)
+   otp='otp'
+   dir2fa='2fa/'
+   prefix=${PASSWORD_STORE_DIR-~/.password-store/$dir2fa}
+   shift
+   ;;
+   *)
+   dmenu_options="${dmenu_options} ${option}"
+   shift
+   ;;
+esac
+done
 
-prefix=${PASSWORD_STORE_DIR-~/.password-store}
 password_files=( "$prefix"/**/*.gpg )
 password_files=( "${password_files[@]#"$prefix"/}" )
 password_files=( "${password_files[@]%.gpg}" )
 
-password=$(printf '%s\n' "${password_files[@]}" | dmenu "$@")
+if [[ $otp == '' ]]; then
+   password=$(printf '%s\n' "${password_files[@]}" | grep -v '2fa/' | 
dmenu $dmenu_options "$@")
+else
+   password=$(printf '%s\n' "${password_files[@]}" | dmenu $dmenu_options 
"$@")
+fi
 
 [[ -n $password ]] || exit
 
 if [[ $typeit -eq 0 ]]; then
-   pass show -c "$password" 2>/dev/null
+   pass $otp show -c "$dir2fa$password" 2>/dev/null
 else
-   pass show "$password" | { IFS= read -r pass; printf %s "$pass"; } |
+   pass $otp show "$dir2fa$password" | { IFS= read -r pass; printf %s 
"$pass"; } |
xdotool type --clearmodifiers --file -
 fi
-- 
2.31.1



signature.asc
Description: PGP signature


Re: [PATCH] adding pass-otp to passmenu

2018-09-12 Thread Amir Yalon
Hi Alessandro,

One problem that I can see with this patch is that the pass-otp
extension is not distributed as part of pass. Maybe it could be
generalised to specify any alternative sub-command to substitute
for `show`.

On Wed, Sep 12, 2018, at 13:10, Alessandro Accardo wrote:
> Here you can find the (smallest as possible) patch in attachment, I
> hope you> can include it in the sources, I think this will be extremely useful
> for every> person who uses 2FA with unix-pass and a dmenu interface.


>  



___
Password-Store mailing list
Password-Store@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/password-store


[PATCH] adding pass-otp to passmenu

2018-09-12 Thread Alessandro Accardo
Hi all!
Thanks for the work you do every day with this extremely useful piece of 
software. I had the need to use pass-otp from the dmenu interface and 
didn't 
find a way with the current version of passmenu, so I decided to patch it.
Here you can find the (smallest as possible) patch in attachment, I hope 
you 
can include it in the sources, I think this will be extremely useful for every 
person who uses 2FA with unix-pass and a dmenu interface.


Thanks for reading this email.
Alessandro 'kLeZ' Accardo.

>From 0dc74d22042c8797626e009e065958f349f74606 Mon Sep 17 00:00:00 2001
From: Alessandro Accardo 
Date: Wed, 12 Sep 2018 09:38:47 +0200
Subject: [PATCH] * Added the ability to use pass-otp with argument

---
 contrib/dmenu/passmenu | 16 +---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/contrib/dmenu/passmenu b/contrib/dmenu/passmenu
index 83268bc..86b8252 100755
--- a/contrib/dmenu/passmenu
+++ b/contrib/dmenu/passmenu
@@ -2,11 +2,16 @@
 
 shopt -s nullglob globstar
 
+otp=0
 typeit=0
 if [[ $1 == "--type" ]]; then
 	typeit=1
 	shift
 fi
+if [[ $1 == "--otp" ]]; then
+otp=1
+shift
+fi
 
 prefix=${PASSWORD_STORE_DIR-~/.password-store}
 password_files=( "$prefix"/**/*.gpg )
@@ -17,9 +22,14 @@ password=$(printf '%s\n' "${password_files[@]}" | dmenu "$@")
 
 [[ -n $password ]] || exit
 
+pass_cmd="show"
+if [[ $otp -eq 1 ]]; then
+pass_cmd="otp"
+fi
+
 if [[ $typeit -eq 0 ]]; then
-	pass show -c "$password" 2>/dev/null
+pass $pass_cmd -c "$password" 2>/dev/null
 else
-	pass show "$password" | { IFS= read -r pass; printf %s "$pass"; } |
-		xdotool type --clearmodifiers --file -
+pass $pass_cmd "$password" | { IFS= read -r pass; printf %s "$pass"; } |
+	xdotool type --clearmodifiers --file -
 fi
-- 
2.16.4



signature.asc
Description: This is a digitally signed message part.
___
Password-Store mailing list
Password-Store@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/password-store