Coder Social home page Coder Social logo

getkey's Introduction

getkey

Command-line Freedesktop.org Secret Service client.

Tested against gnome-keyring.

APT Depends:

  • python3-secretstorage
  • xclip
  • wl-clipboard

getkey

Python command-line client using secretstorage

List available keyrings:

$ getkey --list-keyrings
login
foobar

Unlock a locked keyring if required, prompting for a password on stdin:

$ getkey --keyring foobar --unlock
...

List keys from a given keyring:

$ getkey --keyring foobar --list
random1
pw3

Retreive and print out the plaintext key:

$ getkey --keyring foobar random1
...

Retreive a key into the X selection buffer, ready for pasting. Does not display the key:

$ getkey --keyring foobar --selection pw3

Generate and store a new key, using --generate-length random alnum chars:

$ getkey --keyring foobar --generate pw4

Generate and update a key, including special chars (when the normal generate password is rejected):

$ getkey --generate --generate-special --update pwd -o

Output keynames for tab-completion:

$ getkey --keyring foobar --list
random1
pw3
$ getkey --keyring foobar --list ra*
random1

--list-cache

Use getkey --list-cache=${XDG_CACHE_HOME:-$HOME/.cache}/getkey/list-cache to order most recently used keys first in the --list output.

$ getkey -k session --list-cache ~/.cache/getkey/list-cache -l
test3
test2
test
$ getkey -k session --list-cache ~/.cache/getkey/list-cache test2 -o
DFlG5OMsOyiqH9Zi
$ getkey -k session --list-cache ~/.cache/getkey/list-cache -l
test2
test3
test
$ cat ~/.cache/getkey/list-cache
test2

awesome getkey.lua

Support for Awesome using either awful.prompt with tab-completion or an interactive awful.menu.

Customize the keyring to use for the prompt:

GETKEY_KEYRING = "foobar"

Bind to a key in your ~/.config/awesome/rc.lua using:

local getkey = require("awesome-getkey")

globalkeys = awful.util.table.join(
    ...

    awful.key({ modkey },            "e",     function () getkey.prompt() end),
    awful.key({ modkey, "Shift" },   "e",     function () getkey.menu() end),

    ...
)

i3/sway dmenu_getkey

Trivial wrapper around dmenu and getkey, for use with i3/sway

bindsym $mod+e exec --no-startup-id "dmenu_getkey"

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.