Copyright | (c) 2014 Igor Babuschkin Antoine R. Dumont |
---|---|
License | BSD3-style (see LICENSE) |
Maintainer | Antoine R. Dumont <eniotna.t@gmail.com> |
Stability | unstable |
Portability | unportable |
Safe Haskell | None |
Language | Haskell98 |
This module provides 5 XMonad.Prompts to ease password manipulation (generate, read, edit, remove):
- two to lookup passwords in the password-store; one of which
copies to the clipboard, and the other uses
xdotool
to type the password directly. - one to generate a password for a given password label that the user inputs.
- one to edit a password for a given password label that the user inputs.
- one to delete a stored password for a given password label that the user inputs.
All those prompts benefit from the completion system provided by the module XMonad.Prompt.
The password store is setup through an environment variable
PASSWORD_STORE_DIR, or $HOME/.password-store
if it is unset.
The editor is determined from the environment variable EDITOR.
Source:
- The password store implementation is here.
- Inspired by http://babushk.in/posts/combining-xmonad-and-pass.html
Synopsis
- passPrompt :: XPConfig -> X ()
- passOTPPrompt :: XPConfig -> X ()
- passGeneratePrompt :: XPConfig -> X ()
- passGenerateAndCopyPrompt :: XPConfig -> X ()
- passRemovePrompt :: XPConfig -> X ()
- passEditPrompt :: XPConfig -> X ()
- passTypePrompt :: XPConfig -> X ()
Usage
You can use this module with the following in your ~/.xmonad/xmonad.hs
:
import XMonad.Prompt.Pass
Then add a keybinding for passPrompt
, passGeneratePrompt
,
passRemovePrompt
, passEditPrompt
or passTypePrompt
:
, ((modMask , xK_p) , passPrompt xpconfig) , ((modMask .|. controlMask, xK_p) , passGeneratePrompt xpconfig) , ((modMask .|. shiftMask, xK_p) , passEditPrompt xpconfig) , ((modMask .|. controlMask .|. shiftMask, xK_p), passRemovePrompt xpconfig)
For detailed instructions on:
- editing your key bindings, see XMonad.Doc.Extending.
- how to setup the password store, see http://git.zx2c4.com/password-store/about/
passPrompt :: XPConfig -> X () Source #
A prompt to retrieve a password from a given entry.
passOTPPrompt :: XPConfig -> X () Source #
A prompt to retrieve a OTP from a given entry.
passGeneratePrompt :: XPConfig -> X () Source #
A prompt to generate a password for a given entry. This can be used to override an already stored entry. (Beware that no confirmation is asked)
passGenerateAndCopyPrompt :: XPConfig -> X () Source #
A prompt to generate a password for a given entry and immediately copy it to the clipboard. This can be used to override an already stored entry. (Beware that no confirmation is asked)
passRemovePrompt :: XPConfig -> X () Source #
A prompt to remove a password for a given entry. (Beware that no confirmation is asked)
passEditPrompt :: XPConfig -> X () Source #
A prompt to edit a given entry. This doesn't touch the clipboard.
passTypePrompt :: XPConfig -> X () Source #
A prompt to type in a password for a given entry. This doesn't touch the clipboard.