~palb91/bwm

ed82eeb9e9afb3d4caa66734c190224c8c150ad0 — Pierre-Albéric TROUPLIN 5 months ago b8eca8d
README: move rst to md
2 files changed, 49 insertions(+), 55 deletions(-)

A README.md
D README.rst
A README.md => README.md +49 -0
@@ 0,0 1,49 @@
# bwm

- Author:       **palb91**
- License:      **MIT**
- Description:  **Type a password from bitwarden in a Wayland environment**
- Dependancies:

    - [bitwarden-cli](https://github.com/bitwarden/cli);
    - [wtype](https://github.com/atx/wtype);
    - [bemenu](https://github.com/Cloudef/bemenu);
    - [wl-clipboard](https://github.com/bugaevc/wl-clipboard) (optional).

```
Type a password from bitwarden in a Wayland environment.

Usage:
    bwm [ -h ]
    bwm [ -u | -b | -o ] [URL]
    bwm -c [ -u | -o ] [URL]

Options:
    -u, --user  Type the username instead of the password.
    -b, --both  Type the username and the password separated by a <Tab>.
    -o, --otp   Type the otp code if exists.
    -c, --copy  Copy instead of type.
    -h, --help  Print this help.

Argument:
    URL         If any, must be the last parameter. bwm will try to find only
                matching values from `bw`.
```

## Note

I mostly use it with [qutebrowser](https://github.com/qutebrowser/qutebrowser).

I set up qutebrowser as follow (`bwm` should be in your `$PATH`):

```python
# in config.py
config.bind('<Alt-p>', 'mode-enter insert ;; spawn -- bwm {url}')
config.bind('<Alt-u>', 'mode-enter insert ;; spawn -- bwm -u {url}')
config.bind('<Alt-l>', 'mode-enter insert ;; spawn -- bwm -b {url}')
config.bind('<Alt-o>', 'mode-enter insert ;; spawn -- bwm -o {url}')
config.bind('<Alt-p>', 'spawn -- bwm    {url}', mode='insert')
config.bind('<Alt-u>', 'spawn -- bwm -u {url}', mode='insert')
config.bind('<Alt-l>', 'spawn -- bwm -b {url}', mode='insert')
config.bind('<Alt-o>', 'spawn -- bwm -o {url}', mode='insert')
```

D README.rst => README.rst +0 -55
@@ 1,55 0,0 @@
``bwm``
#######

    :Author:       palb91
    :License:      MIT
    :Description:  Type a password from bitwarden in a Wayland environment
    :Dependancies: - bitwarden-cli_;
                   - wtype_;
                   - bemenu_;
                   - wl-clipboard_ (optional).

::

    Type a password from bitwarden in a Wayland environment.

    Usage:
        bwm [-h]
        bwm [-u|-b|-o] [URL]
        bwm -c [-u|-o] [URL]

    Options:
        -u, --user  Type the username instead of the password.
        -b, --both  Type the username and the password separated by a <Tab>.
        -o, --otp   Type the otp code if exists.
        -c, --copy  Copy instead of type.
        -h, --help  Print this help.

    Argument:
        URL         If any, must be the last parameter. bwm will try to find
                    only matching values from `bw`.

Note:
=====

I mostly use it with qutebrowser_.

I set up qutebrowser as follow (`bwm` should be in your `$PATH`):

.. code:: python

    # in config.py
    config.bind('<Alt-p>', 'mode-enter insert ;; spawn -- bwm {url}')
    config.bind('<Alt-u>', 'mode-enter insert ;; spawn -- bwm -u {url}')
    config.bind('<Alt-l>', 'mode-enter insert ;; spawn -- bwm -b {url}')
    config.bind('<Alt-o>', 'mode-enter insert ;; spawn -- bwm -o {url}')
    config.bind('<Alt-p>', 'spawn -- bwm    {url}', mode='insert')
    config.bind('<Alt-u>', 'spawn -- bwm -u {url}', mode='insert')
    config.bind('<Alt-l>', 'spawn -- bwm -b {url}', mode='insert')
    config.bind('<Alt-o>', 'spawn -- bwm -o {url}', mode='insert')


.. _qutebrowser:  https://github.com/qutebrowser/qutebrowser
.. _wtype:        https://github.com/atx/wtype
.. _bemenu:       https://github.com/Cloudef/bemenu
.. _wl-clipboard: https://github.com/bugaevc/wl-clipboard