Giter Club home page Giter Club logo

ykoath's Introduction

ykoath

ykoath is a convenient way to use oath codes stored on your Yubikey.

Ykoath uses rofi to select the code you want to use. Upon selection, the corresponding oath code is requested from the Yubikey and typed onto the screen. (not copied to the clipboard)

To run

The simplest way to run is with nix. If you have nix installed, run this package using nix run github:cstoltze/ykoath

Installation

with nix

nix-env -iA github:cstoltze/ykoath

To uninstall

nix-env --uninstall github:cstoltze/ykoath

NixOS (with flakes enabled)

add this url to your flake inputs. In your flake.nix file, add the following code within the inputs stanza.

ykoath.url = "github:cstoltze/ykoath";

TODO: ... and add the following code to environment.systemPackages...

Other linux

  1. Ensure that all dependencies are installed
    1. rofi
    2. xdotool
    3. yubikey-manager (which provides ykman)
  2. Copy the ykoath script into your PATH

Tips

  1. Make sure your Yubikey is plugged in before running ykoath
  2. Ensure that the correct textbox has focus before running. So that the code is typed into the correct place.
  3. Use a keyboard shortcut to launch ykoath
    1. My keyboard shortcut is Super-O. In my i3 config, this reads as bindsym Mod4+o exec ykoath

Rough edges

This is a utility meant mostly for my own use. There are some rough edges:

  • It doesn't nicely handle errors
    • make sure the Yubikey is plugged in before running the script
  • If your oath code requires touch, there's no visible indication on the screen that you need to touch the Yubikey.
    • my Yubikey flashes when it needs to be touched
    • you could install something like yubikey-touch-detector for general purpose touch detection.
  • It is most useful when launched with a system-wide keyboard shortcut
    • maybe there should be an option to copy to the clipboard instead of typing directly onto the screen
  • It only works on some linux distros. I think the biggest limiter is the xdotool dependency.

ykoath's People

Contributors

cstoltze avatar

Watchers

 avatar

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.