m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2020-05-31 12:34:48 +0200
committerMarcin Chrzanowski <m@m-chrzan.xyz>2022-07-01 08:37:20 +0200
commit0aeec8cd7727883214158e910e340e00f493f168 (patch)
tree81978923fa01e1ae42ef75ff4a5dea47c6508a3b
parentc9a74565af12fa93b6e0b0bac1c5235033bed343 (diff)
Document OTP flags
-rw-r--r--contrib/dmenu/README.md23
1 files changed, 20 insertions, 3 deletions
diff --git a/contrib/dmenu/README.md b/contrib/dmenu/README.md
index 8a196cb..b4bc81d 100644
--- a/contrib/dmenu/README.md
+++ b/contrib/dmenu/README.md
@@ -1,8 +1,23 @@
`passmenu` is a [dmenu][]-based interface to [pass][], the standard Unix
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.
+one open.
+
+If `--type` is specified, the password is typed using [xdotool][] instead of
+copied to the clipboard.
+
+If `--otp` is specified, it will be assumed that [pass-otp][] is an installed
+extension and instead of just getting the specified password, `passmenu` will
+get the current one-time code.
+
+If `--infer-otp` is specified, `passmenu` will determine whether to treat the
+selected password as a regular password or an OTP secret based on a regex
+pattern match. Note that the default pattern matches all password IDs, so you
+probably want to use this flag in combination with `--otp-pattern`.
+
+If `--otp-pattern REGEXP` is specified, password IDs matching the regular
+expression will be interpreted as secrets for OTP-style two-factor
+authentication. When used with `--otp`, only OTP password IDs will be displayed.
On wayland [dmenu-wl][] is used to replace dmenu and [ydotool][] to replace xdotool.
Note that the latter requires access to the [uinput][] device, so you'll probably
@@ -10,7 +25,8 @@ need to add an extra udev rule or similar to give certain non-root users permiss
# Usage
- passmenu [--type] [dmenu arguments...]
+
+ passmenu [--type] [--otp] [--infer-otp] [--otp-pattern <regexp>] [dmenu arguments...]
[dmenu]: http://tools.suckless.org/dmenu/
[xdotool]: http://www.semicomplete.com/projects/xdotool/
@@ -18,3 +34,4 @@ need to add an extra udev rule or similar to give certain non-root users permiss
[dmenu-wl]: https://github.com/nyyManni/dmenu-wayland
[ydotool]: https://github.com/ReimuNotMoe/ydotool
[uinput]: https://www.kernel.org/doc/html/v4.12/input/uinput.html
+[pass-otp]: https://github.com/tadfisher/pass-otp