A rofi frontend for pass
This project is deprecated. Please check out autopass.cr. Autopass.cr has all the features of autopass and some more. Migrating is easy, you'll only need to rebuild the cache.
- performs autotype with entries
- allows setting window name property (a regex) to match against window titles
- automatically focuses correct window or asks you to
- allows any amount of additional properties which can be used in autotype
- displays entries that are most likely to match currently focused window first
- uses encrypted cache to store pass entries in a single file for fast startup
- OTP (one-time-password) generation (install the ruby gem
rotp
for this)
Get autopass-git with your favorite aur helper
- Install the ruby development package from your distribution (
ruby-devel
orruby-dev
on Debian) - Run
gem install bundler
to install the bundler ruby gem - Clone this repositority and
cd
into it - Run
bundle install
- Then run
bundle exec rake install
with root permissions (because it will install autopass globally)
Optionally you can install one of the following browser extensions for better autotype. These add your current URL to your title (and window title) which can be matched by the URL entry in your password entry.
- Chrom(e|ium) extension url-in-title
- Firefox extension add-url-to-window-title (Repository)
- run
autopass
- Highlight an entry either by fuzzy search or with arrow keys
- Press Enter for autotype
- Press Alt+1 for autotype_1
- Press Alt+2 for autotype_2
- Press Alt+3 for autotype_3
- etc
- Press Alt+p to copy pass to clipboard
- Press Alt+u to copy user to clipboard
- Press Alt+c to copy otp code to clipboard
- Press Alt+t to autotype a tan from the entry
- Press Alt+o to open specified URL in your browser
Copied values are cleared from clipboard after 45 seconds
Create entries as usual with pass insert
etc.
Edit them with pass edit
and add additional properties in the following syntax
my_super_secret_password
---
user: username
url: https://example.com/#
some_other_property: some value
autotype: [user, ':tab', some_other_property, ':tab', pass, ':tab', ':otp']
autotype_1: [user]
autotype_2: [pass]
autotype_3: user some_other_property :tab pass # this is also ok
window: some site.*- Chromium
otp_secret: my_one_time_password_secret
tan: |
204194
294922
240581
# ...
You can write any kind of key value pairs here as long as it's valid yaml. The
keys autotype
, autotype_{1-7}
, window
, otp_secret
and tan
have special
meanings. ':tab'
hits - you guessed it - the Tab key, ':enter'
hits the
Enter key, ':otp'
types the current time based one time password, :delay
delays the autotype sequence. Make sure you add otp_secret
to an entry when
using ':otp'
.
Default config file:
---
# you can insert any environment variable inside %{} for it to be replaced by
# the value of that variable. If it needs to be at the beginning of the string
# you have to escape it (e.g. `foo: %{BAR}` will raise an error, `foo: '%{BAR}'`
# will work though)
cache_file: '%{HOME}/.cache/autopass/autopass.cache'
# cache_key: YOUR_KEY_ID
# key_bindings:
# autotype_tan: Alt+t
# copy_username: Alt+u
# copy_password: Alt+p
# open_browser: Alt+o
# # clipboard command to use:
# # (default)
# clip_command: 'xclip'
# # or
# clip_command: 'xclip -selection clipboard'
# # Browsers window names to use for matching
# browsers:
# - chrome
# - chromium
window
: name of the entry (without parent group(s))autotype
:[user, ':tab', pass]
autotype_1
:[pass]
autotype_2
:[user]
autotype_3
:[':otp']
alt_delay
:0.5
delay
:0.5
You can define global fallbacks for autotype
and autotype_{1-7}
in the
config file located in $XDG_CONFIG_HOME/autopass
. You could override the
default behavior of autotype_1
and autotype_2
for example to be reversed:
autotype_1: [user]
, autotype_2: [pass]
.
Furthermore you can set keys to use for looking up the custom autotype sequence
autotype_key: autotype
, username username_key: user
and password
password_key: pass
in the config file.
Some users experience problems with alternative autotypes (using the Alt
modifier key). It almost certanly is caused by releasing the Alt key only after
the autotype has already started. Therefor there's now a config option
alt_delay
which waits the amount in seconds before starting the autotype for
alternative autotypes. The value is 0.5 by default.
xdotool uses the wrong keyboard layout if it is set in xorg.conf.d
instead of
using the command xkbmap
.