Coder Social home page Coder Social logo

rofi-1p's Introduction

rofi-1p

rofi-1p is a 1password integration with rofi. Its power resides on the ability to scan through all your items no matter the type, allowing you to access not only your username and password for every account, but your notes, identities, etc. Inspired by rofi-1pass :)

rofi-1p.gif

Features

Available

  • Secure login (via pinentry)
  • Distinct categories support:
    • Logins
    • Secure notes
    • Credit cards
    • Identities
    • Passwords
  • Scheduled deauthorization process (via at) as seen in the web integration.

Upcoming

  • 2FA within rofi-1p
  • Open item url

Installation

Currently there’s no package available, so a manual installation is required.

Requirements

pinentry, at, jq, xclip, op

Steps

  1. Install and login to your 1password account following the steps described in their page: Getting started

  2. Verify you have a ~/.op folder with a config file like these:

    # ~/.op/config
    {
            "latest_signin": "my",
            "device": "XXXXXXXXXXXXXXXXXXXXX",
            "accounts": [
                    {
                            "shorthand": "my",
                            "url": "https://my.1password.com",
                            "email": "[email protected]",
                            "accountKey": "XX-XXXXXX-XXXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
                            "userUUID": "XXXXXXXXXXXXXXXXXXXXXXXXXX"
                    }
            ]
    }
  3. Download the source code

    git clone https://github.com/jaimecgomezz/rofi-1p.git && cd rofi-1p
  4. Symlink the rofi-1p script to some place accessible by your PATH variable

    # Assuming you download the rofi-1p source code in your root folder: ~/
    
    # Available to your account
    sudo ln -s ~/rofi-op/rofi-1p /usr/local/bin
    
    # Available to every account on your computer
    sudo ln -s ~/rofi-op/rofi-1p /usr/bin
    
    # Adding the folder path to your PATH variable
    export $PATH="$PATH:~/rofi-1p"
  5. Verify you have the required dependencies:

    ./check # No output means everything ok
  6. Run rofi with rofi-1p as a modi

    rofi -modi 1P:rofi-1p -show 1P

Mods

Disabling the scheduled deauthorization process

# Comment the following lines:

# DEATHORIZATION-PROCESS

# prevent_previous_timeouts
# set_auth_timeout

Notes

The scheduled deauthorization process emulates the web browser integration (10 minutes). Even if you decide to disable it, the op client will revoke your access every 30 minutes.

Contributing

Every PR is welcomed:)

License

Code released under the MIT license.

rofi-1p's People

Contributors

jaimecgomezz avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

rofi-1p's Issues

Improve performance

Breaking? Origin
Yes 🇲🇽

Description

The current performance depends entirely on the network, as every step required to access a given field needs to retrieve information from the 1password database, as described:

  1. Retrieve the complete list of available items (logins, identities, credit cards, notes, etc)
  2. Select an item.
  3. Retrieve the item and list all the non-empty fields.
  4. Select the required field.
  5. Retrieve the item and access the required field.

This flow is unnecessary slow for quite a simple task like copy-pasting your accounts information. It demands a performance boost.

Describe the solution you'd like

The first approach that comes to mind is having a cache system that rofi-1p can query instead of the 1password database every time it needs to access an item information. The characteristics of this cache-like system should be:

  • SECURE, accessible ONLY by the account owner.
  • Refreshable, so the user can decide whenever the cache needs to be updated.
  • Self-destructive, so the user won’t need to manually delete it.
  • Simple, so the user won’t notice the difference while using it.

Teachability, documentation, adoption, migration strategy, etc.

It is almost sure the this system will require implementing the gpg encryption.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.