Skip to content

A rofi integration with the 1password command line tool

License

Notifications You must be signed in to change notification settings

jaimecgomezz/rofi-1p

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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": "an@email.com",
                            "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.

About

A rofi integration with the 1password command line tool

Topics

Resources

License

Stars

Watchers

Forks

Languages