Skip to content

(Yet another) dmenu-based client for pass (https://www.passwordstore.org) that supports usernames and autotyping

License

Notifications You must be signed in to change notification settings

MacGyverNL/passtyper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

NAME

passtyper - a simple dmenu-based client for pass

SYNOPSIS

passtyper [ OPTIONS ] [ -- dmenu arguments ]

DESCRIPTION

passtyper is a client for pass I wrote in a few hours because none of the existing clients suited my usecase exactly. It uses xdotool for autotyping password, username, or the combination of username and password separated by a configurable character. This character defaults to tab for compability with most web login forms, but can also be set to \n, :, or other printable characters for compatibility with other forms of entry.

Alternatively, passtyper supports writing one or both of the fields to the clipboard instead, using the same mechanism pass uses, which respects PASSWORD_STORE_CLIP_TIME and defaults to 45 seconds. The main usecase for this is a form that does not adhere to the expected sequence of <username> <tab> <password>, in which case the safest option is to autotype the password and paste the username from clipboard.

passtyper uses a few mechanisms to automatically retrieve the username from a pass entry:

  1. Search the metadata for a line beginning with "username: " (not case sensitive). If found, return the remainder of the line as username.
  2. Use the first line of the metadata, unless that line contains a or :.
  3. Use the environment variable FALLBACKUSER if set to a non-empty string.
  4. Use the basename of the pass entry with a configurable suffix set in FALLBACKUSERSUFFIX, which is useful if you are in the habit of using @.example.

Password selection is done through dmenu.

If no options are given, passtyper defaults to autotyping the password.

OPTIONS

Option parsing is done using getopt. Long options may be abbreviated as long as the abbreviation is unambiguous. Option arguments must either be their starting character or the entire argument (type may also be provided as t, clipboard as c, none as n).

-p[t|c|n], --password[=type|clipboard|none]: Control the behaviour of password output: type it, copy it to clipboard, or suppress the password. Defaults to type.

-u[t|c|n], --username[=type|clipboard|none]: Control the behaviour of username output: type it, copy it to clipboard, or suppress the username. By default passtyper does not output usernames. If the argument to --username is omitted, it uses type.

-s'CHAR', --separator='CHAR': Use a different separator for the concatenation of username and password. Newlines (\n), tabs (\t) and all printable characters are supported. Defaults to a tab (\t).

CONFIGURATION

The file ${XDG_CONFIG_HOME}/passtyper/config (default $HOME/.config/passtyper/config) is sourced automatically if present. Set FALLBACKUSER or FALLBACKUSERSUFFIX here.

DEPENDENCIES

pass (duh)

dmenu (or something providing dmenu, such as rofi (untested))

xdotool for autotype-support.

xclip for clipboard-support.

AUTHOR & COPYRIGHT & LEGAL

Most of passtyper was (badly) written in a few hours by Pol Van Aubel and licensed under CC0.

The clip() function was written by Jason A. Donenfeld of zx2c4.com and is licensed under CC0.

Use of passtyper is at your own risk, and the author will not accept liability for it dumping your password into IRC channels, shady websites, command line history, process listings, or other screw-ups. Read the code, it's just string juggling.

About

(Yet another) dmenu-based client for pass (https://www.passwordstore.org) that supports usernames and autotyping

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages